Skip to content

Commit 08b5d08

Browse files
committed
refactor: use new type-helper global types and remove all import types
1 parent f7b6f95 commit 08b5d08

File tree

20 files changed

+15
-40
lines changed

20 files changed

+15
-40
lines changed

packages/async-queue/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {newFlatomise} from '@alwatr/flatomise';
22
import {packageTracer} from '@alwatr/package-tracer';
33

4-
import type {DictionaryOpt} from '@alwatr/type-helper';
5-
64
packageTracer.add(__package_name__, __package_version__);
75

86
/**

packages/async-queue/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["@alwatr/nano-build"]
8+
"types": ["@alwatr/nano-build", "@alwatr/type-helper"],
99
},
1010
"include": ["src/**/*.ts"],
11-
"references": [{"path": "../flatomise"}, {"path": "../type-helper"}, {"path": "../package-tracer"}],
11+
"references": [{"path": "../flatomise"}, {"path": "../package-tracer"}],
1212
}

packages/dedupe/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {globalScope} from '@alwatr/global-scope';
22
import '@alwatr/polyfill-has-own';
33

4-
import type {DictionaryOpt} from '@alwatr/type-helper';
5-
64
declare global {
75
// eslint-disable-next-line no-var
86
var __alwatr_dedupe__: string | true;

packages/dedupe/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["@alwatr/nano-build"],
8+
"types": ["@alwatr/nano-build", "@alwatr/type-helper"],
99
},
1010
"include": ["src/**/*.ts"],
1111
"references": [
12-
{"path": "../type-helper"},
12+
1313
{ "path": "../global-scope" },
1414
{"path": "../polyfill-has-own"},
1515
{"path": "../package-tracer"}

packages/delay/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ packageTracer.add(__package_name__, __package_version__);
55

66
import {requestAnimationFrame, requestIdleCallback} from './polyfill.js';
77

8-
import type {HasAddEventListener} from '@alwatr/type-helper';
9-
108
/**
119
* A utility module to help manage asynchronous operations and waiting for events or timeouts.
1210
*/

packages/delay/src/polyfill.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {globalScope} from '@alwatr/global-scope';
22

3-
import type {DictionaryOpt} from '@alwatr/type-helper';
4-
53
// eslint-disable-next-line @typescript-eslint/no-explicit-any
64
export const win = globalScope as DictionaryOpt<any>;
75

packages/delay/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["node", "@alwatr/nano-build"]
8+
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
99
},
1010
"include": ["src/**/*.ts"],
1111
"references": [
1212
{"path": "../global-scope"},
13-
{"path": "../type-helper"},
1413
{"path": "../package-tracer"},
1514
{"path": "../parse-duration"}
1615
]

packages/fetch/src/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {handleCacheStrategy_, logger_, processOptions_, cacheSupported} from './core.js';
22

33
import type {FetchOptions, ResponseError, ResponseSuccess} from './type.js';
4-
import type {JsonObject} from '@alwatr/type-helper';
54

65
export {cacheSupported};
76
export type * from './type.js';

packages/fetch/src/type.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type {Duration} from '@alwatr/parse-duration';
2-
import type {DictionaryOpt, DictionaryReq, Json, JsonObject} from '@alwatr/type-helper';
32

43
/**
54
* Represents the available HTTP methods.

packages/fetch/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["@alwatr/nano-build"]
8+
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
99
},
1010
"include": ["src/**/*.ts"],
1111
"references": [
1212
{"path": "../package-tracer"},
1313
{"path": "../logger"},
1414
{"path": "../global-scope"},
1515
{"path": "../delay"},
16-
{"path": "../parse-duration"},
17-
{"path": "../type-helper"}
16+
{"path": "../parse-duration"}
1817
]
1918
}

packages/local-storage/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {packageTracer} from '@alwatr/package-tracer';
22

3-
import type {Json, JsonValue} from '@alwatr/type-helper';
4-
53
packageTracer.add(__package_name__, __package_version__);
64

75
/**

packages/local-storage/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["@alwatr/nano-build"]
8+
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
99
},
1010
"include": ["src/**/*.ts"],
11-
"references": [{"path": "../type-helper"}, {"path": "../package-tracer"}],
11+
"references": [{"path": "../package-tracer"}],
1212
}

packages/node-fs/src/json.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {logger} from './common.js';
22

3-
import type {JsonValue} from '@alwatr/type-helper';
4-
53
/**
64
* Parse json string.
75
*

packages/node-fs/src/read-json.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import {logger} from './common.js';
22
import {parseJson} from './json.js';
33
import {readFile, readFileSync} from './read-file.js';
44

5-
import type {JsonValue, MaybePromise} from '@alwatr/type-helper';
6-
75
/**
86
* Enhanced read json file (async).
97
*

packages/node-fs/src/write-json.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import {logger} from './common.js';
44
import {jsonStringify} from './json.js';
55
import {writeFile, writeFileSync} from './write-file.js';
66

7-
import type {JsonValue, MaybePromise} from '@alwatr/type-helper';
8-
97
/**
108
* Enhanced write json file (Asynchronous).
119
*

packages/node-fs/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["node", "@alwatr/nano-build"],
8+
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"],
99
},
1010
"include": ["src/**/*.ts"],
1111
"references": [
1212
{"path": "../async-queue"},
1313
{"path": "../flat-string"},
1414
{"path": "../logger"},
15-
{"path": "../package-tracer"},
16-
{"path": "../type-helper"}
15+
{"path": "../package-tracer"}
1716
],
1817
}

packages/package-tracer/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type {DictionaryOpt} from '@alwatr/type-helper';
2-
31
/**
42
* A module for tracking package information.
53
* This module is useful for keeping track of loaded packages and their versions.

packages/package-tracer/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["@alwatr/nano-build"]
8+
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
99
},
1010
"include": ["src/**/*.ts"],
11-
"references": [{"path": "../type-helper"}],
11+
1212
}

packages/platform-info/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {packageTracer} from '@alwatr/package-tracer';
22

3-
import type {Mutable} from '@alwatr/type-helper';
4-
53
packageTracer.add(__package_name__, __package_version__);
64

75
/**

packages/platform-info/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"outDir": "dist",
66
"emitDeclarationOnly": true,
77
"composite": true,
8-
"types": ["node", "@alwatr/nano-build"],
8+
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"],
99
},
1010
"include": ["src/**/*.ts"],
11-
"references": [{"path": "../package-tracer"}, {"path": "../type-helper"}]
11+
"references": [{"path": "../package-tracer"}]
1212
}

0 commit comments

Comments
 (0)