@omnific/tsconfig 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/base.json +5 -5
- package/bundler.d.ts +18 -0
- package/bundler.json +5 -0
- package/node.json +1 -2
- package/package.json +7 -4
- package/{browser.json → web.json} +1 -2
package/README.md
CHANGED
|
@@ -4,20 +4,22 @@ Shared TypeScript configuration presets for Omnific packages.
|
|
|
4
4
|
|
|
5
5
|
## Presets
|
|
6
6
|
|
|
7
|
-
- `@omnific/tsconfig/browser.json`
|
|
8
7
|
- `@omnific/tsconfig/node.json`
|
|
8
|
+
- `@omnific/tsconfig/web.json`
|
|
9
|
+
- `@omnific/tsconfig/bundler.json`
|
|
9
10
|
|
|
10
11
|
## Notes
|
|
11
12
|
|
|
12
|
-
- `@omnific/tsconfig/browser.json` does not require extra global type packages.
|
|
13
13
|
- Projects that extend `@omnific/tsconfig/node.json` should install `@types/node` in the consuming workspace.
|
|
14
|
+
- `@omnific/tsconfig/web.json` provides Web platform globals without static asset module declarations.
|
|
15
|
+
- `@omnific/tsconfig/bundler.json` adds ambient declarations for static asset imports such as `*.css` and `*.svg`.
|
|
14
16
|
- If a preset references additional entries in `compilerOptions.types`, the consuming project is responsible for providing those packages.
|
|
15
17
|
|
|
16
18
|
## Example
|
|
17
19
|
|
|
18
20
|
```json
|
|
19
21
|
{
|
|
20
|
-
"extends": "@omnific/tsconfig/
|
|
22
|
+
"extends": "@omnific/tsconfig/web.json",
|
|
21
23
|
"include": ["./**/*.ts"],
|
|
22
24
|
"exclude": ["./dist"]
|
|
23
25
|
}
|
package/base.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "ESNext",
|
|
5
5
|
"module": "ESNext",
|
|
6
|
-
"
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
7
|
"strict": true,
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"noEmit": true,
|
|
10
10
|
"isolatedDeclarations": false,
|
|
11
11
|
"isolatedModules": true,
|
|
12
12
|
"verbatimModuleSyntax": true,
|
|
13
|
-
"exactOptionalPropertyTypes": true,
|
|
14
13
|
"noUncheckedIndexedAccess": true,
|
|
15
14
|
"noImplicitOverride": true,
|
|
16
|
-
"noImplicitReturns": true,
|
|
17
15
|
"esModuleInterop": true,
|
|
18
16
|
"allowSyntheticDefaultImports": true,
|
|
19
17
|
"forceConsistentCasingInFileNames": true,
|
|
20
18
|
"skipLibCheck": true,
|
|
21
19
|
"resolveJsonModule": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"exactOptionalPropertyTypes": false,
|
|
22
|
+
"noImplicitReturns": false
|
|
23
23
|
}
|
|
24
24
|
}
|
package/bundler.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare module '*.png';
|
|
2
|
+
declare module '*.svg';
|
|
3
|
+
declare module '*.jpeg';
|
|
4
|
+
|
|
5
|
+
declare module '*.scss' {
|
|
6
|
+
const content: Record<string, string>;
|
|
7
|
+
export = content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module '*.css' {
|
|
11
|
+
const content: Record<string, string>;
|
|
12
|
+
export = content;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module '*.less' {
|
|
16
|
+
const content: Record<string, string>;
|
|
17
|
+
export = content;
|
|
18
|
+
}
|
package/bundler.json
ADDED
package/node.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnific/tsconfig",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Shared TypeScript configuration presets for Omnific packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,13 +19,16 @@
|
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"base.json",
|
|
22
|
-
"
|
|
22
|
+
"bundler.d.ts",
|
|
23
|
+
"bundler.json",
|
|
23
24
|
"node.json",
|
|
25
|
+
"web.json",
|
|
24
26
|
"README.md"
|
|
25
27
|
],
|
|
26
28
|
"exports": {
|
|
27
|
-
"./
|
|
28
|
-
"./node.json": "./node.json"
|
|
29
|
+
"./bundler.json": "./bundler.json",
|
|
30
|
+
"./node.json": "./node.json",
|
|
31
|
+
"./web.json": "./web.json"
|
|
29
32
|
},
|
|
30
33
|
"peerDependencies": {
|
|
31
34
|
"typescript": ">=6.0.0"
|