Skip to content

Commit 945b778

Browse files
committed
revised typescript in Diff.tsx
1 parent efae829 commit 945b778

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/components/Diff.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Diff(props: DiffProps) {
2828
}
2929

3030
// cleaning preview from stateless data
31-
const statelessCleanning = (obj:{name?:string; componentData?:object; state?:string|any; stateSnaphot?:object; children?:any[]}) => {
31+
const statelessCleanning = (obj:{name?:string; componentData?: Record<string, unknown>; state?:string| any; stateSnaphot?: Record<string, unknown>; children?: any[]}) => {
3232
const newObj = { ...obj };
3333
if (newObj.name === 'nameless') {
3434
delete newObj.name;
@@ -45,7 +45,7 @@ function Diff(props: DiffProps) {
4545
if (newObj.children) {
4646
newObj.children = [];
4747
if (obj.children.length > 0) {
48-
obj.children.forEach((element:{state?:object | string; children?:[]}) => {
48+
obj.children.forEach((element:{state?: Record<string, unknown> | string; children?:[]}) => {
4949
if (element.state !== 'stateless' || element.children.length > 0) {
5050
const clean = statelessCleanning(element);
5151
newObj.children.push(clean);

0 commit comments

Comments
 (0)