Skip to content

Commit

Permalink
chore: add ESNext and DOM lib to TS compiler options (#2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiliangnet authored Nov 25, 2021
1 parent 91f4ecf commit a51d189
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 17 deletions.
5 changes: 4 additions & 1 deletion packages/antd/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
5 changes: 4 additions & 1 deletion packages/benchmark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
5 changes: 4 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
3 changes: 2 additions & 1 deletion packages/element/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"paths": {
"@formily/*": ["../../packages/*", "../../devtools/*"]
},
"plugins": [{ "transform": "./transformer.ts", "after": true }]
"plugins": [{ "transform": "./transformer.ts", "after": true }],
"lib": ["ESNext", "DOM"]
},
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./esm/*", "./lib/*"]
Expand Down
5 changes: 4 additions & 1 deletion packages/grid/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
5 changes: 4 additions & 1 deletion packages/next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.js", "./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*"]
"exclude": ["./src/__tests__/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
5 changes: 4 additions & 1 deletion packages/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
2 changes: 1 addition & 1 deletion packages/reactive-react/src/shared/gc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const registry: FinalizationRegistry<any> =
type Token = { clean: () => void }
export class GarbageCollector<T extends object = any> {
private expireTime: number
private request: NodeJS.Timeout
private request?: ReturnType<typeof setTimeout>;
private token: Token
constructor(clean?: () => void, expireTime = 10_000) {
this.token = {
Expand Down
7 changes: 0 additions & 7 deletions packages/reactive-react/src/shared/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ function globalSelf() {
}

export const globalThisPolyfill: Window = globalSelf()
declare global {
export class FinalizationRegistry<T> {
constructor(cleanup: (cleanupToken: T) => void)
register(object: object, cleanupToken: T, token: T): void
unregister(object: object): void
}
}
5 changes: 4 additions & 1 deletion packages/reactive-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}
5 changes: 4 additions & 1 deletion packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"]
"exclude": ["./src/__tests__/*", "./esm/*", "./lib/*"],
"compilerOptions": {
"lib": ["ESNext", "DOM"]
}
}

0 comments on commit a51d189

Please sign in to comment.