mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 20:02:05 +08:00
- Made the TreeItem.children prop optional since the library allows this and prevents verboseness/unneeded empty arrays
- Added 'dom' lib in tsconfig to fix dom errors from definition dependencies when running `tsc`
This commit is contained in:
2
types/react-sortable-tree/index.d.ts
vendored
2
types/react-sortable-tree/index.d.ts
vendored
@@ -15,7 +15,7 @@ export interface TreeItem {
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
expanded?: boolean;
|
||||
children: TreeItem[];
|
||||
children?: TreeItem[];
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class Test extends React.Component {
|
||||
{
|
||||
title: "Title", subtitle: "Subtitle", children: [
|
||||
{title: "Child 1", subtitle: "Subtitle", children: []},
|
||||
{title: "Child 2", subtitle: "Subtitle", children: []}
|
||||
{title: "Child 2", subtitle: "Subtitle"}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
|
||||
Reference in New Issue
Block a user