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) => {
|
tree.map((item, index) => {
|
||||||
iterator(item, index, level);
|
iterator(item, index, level);
|
||||||
|
|
||||||
if (item.children && item.children.splice) {
|
if (item.children?.splice) {
|
||||||
eachTree(item.children, iterator, level + 1);
|
eachTree(item.children, iterator, level + 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -897,7 +897,7 @@ export function filterTree<T extends TreeItem>(
|
|||||||
return tree
|
return tree
|
||||||
.filter((item, index) => iterator(item, index, level))
|
.filter((item, index) => iterator(item, index, level))
|
||||||
.map(item => {
|
.map(item => {
|
||||||
if (item.children && item.children.splice) {
|
if (item.children?.splice) {
|
||||||
let children = filterTree(
|
let children = filterTree(
|
||||||
item.children,
|
item.children,
|
||||||
iterator,
|
iterator,
|
||||||
@ -937,7 +937,7 @@ export function everyTree<T extends TreeItem>(
|
|||||||
return tree.every((item, index) => {
|
return tree.every((item, index) => {
|
||||||
const value: any = iterator(item, index, level, paths, indexes);
|
const value: any = iterator(item, index, level, paths, indexes);
|
||||||
|
|
||||||
if (value && item.children && item.children.splice) {
|
if (value && item.children?.splice) {
|
||||||
return everyTree(
|
return everyTree(
|
||||||
item.children,
|
item.children,
|
||||||
iterator,
|
iterator,
|
||||||
|
@ -3,8 +3,16 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "./",
|
"rootDir": "./",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"typeRoots": ["./node_modules/@types", "../../types"]
|
"typeRoots": [
|
||||||
|
"../../types",
|
||||||
|
"./node_modules/@types",
|
||||||
|
"../../node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"references": []
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "../amis-formula"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,11 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"typeRoots": ["./node_modules/@types"]
|
"typeRoots": [
|
||||||
|
"../../types",
|
||||||
|
"./node_modules/@types",
|
||||||
|
"../../node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"references": []
|
"references": []
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
"../../node_modules/@types"
|
"../../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"}]
|
"references": [{"path": "../amis-core"}]
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "lib",
|
"outDir": "lib",
|
||||||
"rootDir": "./",
|
"rootDir": "./",
|
||||||
"typeRoots": ["./node_modules/@types", "../../types"]
|
"typeRoots": [
|
||||||
|
"../../types",
|
||||||
|
"./node_modules/@types",
|
||||||
|
"../../node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": ["src/**/*"],
|
||||||
"references": []
|
"references": [{"path": "../amis-core"}, {"path": "../amis-ui"}]
|
||||||
// "references": [{"path": "../amis-core"}, {"path": "../../"}]
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user