mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
调整 tsconfig 配置
This commit is contained in:
parent
ebb798edf6
commit
7a83562589
@ -786,7 +786,7 @@ export function eachTree<T extends TreeItem>(
|
||||
tree.map((item, index) => {
|
||||
iterator(item, index, level);
|
||||
|
||||
if (item.children && item.children.splice) {
|
||||
if (item.children?.splice) {
|
||||
eachTree(item.children, iterator, level + 1);
|
||||
}
|
||||
});
|
||||
@ -897,7 +897,7 @@ export function filterTree<T extends TreeItem>(
|
||||
return tree
|
||||
.filter((item, index) => iterator(item, index, level))
|
||||
.map(item => {
|
||||
if (item.children && item.children.splice) {
|
||||
if (item.children?.splice) {
|
||||
let children = filterTree(
|
||||
item.children,
|
||||
iterator,
|
||||
@ -937,7 +937,7 @@ export function everyTree<T extends TreeItem>(
|
||||
return tree.every((item, index) => {
|
||||
const value: any = iterator(item, index, level, paths, indexes);
|
||||
|
||||
if (value && item.children && item.children.splice) {
|
||||
if (value && item.children?.splice) {
|
||||
return everyTree(
|
||||
item.children,
|
||||
iterator,
|
||||
|
@ -3,8 +3,16 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"outDir": "./dist",
|
||||
"typeRoots": ["./node_modules/@types", "../../types"]
|
||||
"typeRoots": [
|
||||
"../../types",
|
||||
"./node_modules/@types",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"references": []
|
||||
"references": [
|
||||
{
|
||||
"path": "../amis-formula"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,11 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"typeRoots": ["./node_modules/@types"]
|
||||
"typeRoots": [
|
||||
"../../types",
|
||||
"./node_modules/@types",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"references": []
|
||||
|
@ -9,6 +9,11 @@
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*", "__tests__/**/*", "src/custom.d.ts"],
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"__tests__/**/*",
|
||||
"src/custom.d.ts",
|
||||
"../amis-core/src/utils/formula.ts"
|
||||
],
|
||||
"references": [{"path": "../amis-core"}]
|
||||
}
|
||||
|
@ -3,9 +3,12 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "./",
|
||||
"typeRoots": ["./node_modules/@types", "../../types"]
|
||||
"typeRoots": [
|
||||
"../../types",
|
||||
"./node_modules/@types",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"references": []
|
||||
// "references": [{"path": "../amis-core"}, {"path": "../../"}]
|
||||
"references": [{"path": "../amis-core"}, {"path": "../amis-ui"}]
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user