build: stricter typescript
Stricter typescript
This commit is contained in:
parent
729d92d3ef
commit
fa47be84e0
4 changed files with 47 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ npm-debug.log
|
|||
|
||||
# dist
|
||||
dist
|
||||
tsconfig.tsbuildinfo
|
||||
|
|
|
@ -46,7 +46,7 @@ export class HttpModule {
|
|||
static registerAsync(options: HttpModuleAsyncOptions): DynamicModule {
|
||||
return {
|
||||
module: HttpModule,
|
||||
imports: options.imports,
|
||||
...(options.imports && {imports: options.imports}),
|
||||
providers: [
|
||||
...this.createAsyncProviders(options),
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ export class HttpModule {
|
|||
provide: HTTP_MODULE_OPTIONS,
|
||||
useFactory: async (optionsFactory: HttpModuleOptionsFactory) =>
|
||||
optionsFactory.createHttpOptions(),
|
||||
inject,
|
||||
...(inject && {inject}),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ export class HttpService {
|
|||
this.put = this.instance.put;
|
||||
this.post = this.instance.post;
|
||||
this.patch = this.instance.patch;
|
||||
this.head = this.instance.head;
|
||||
this.head = this.instance.head;
|
||||
this.head = this.instance.head as typeof Axios.patch;
|
||||
this.delete = this.instance.delete;
|
||||
this.get = this.instance.get;
|
||||
this.request = this.instance.request;
|
||||
|
|
|
@ -1,19 +1,44 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"removeComments": true,
|
||||
"noLib": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es6",
|
||||
"sourceMap": false,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./lib",
|
||||
"skipLibCheck": true,
|
||||
},
|
||||
"include": ["lib/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"display": "Node 18 + Strictest",
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"es2022"
|
||||
],
|
||||
"module": "commonjs",
|
||||
"target": "es2022",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"moduleResolution": "node",
|
||||
"allowUnusedLabels": false,
|
||||
"allowUnreachableCode": false,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"checkJs": true,
|
||||
"declaration": true,
|
||||
"removeComments": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./lib",
|
||||
"incremental": true,
|
||||
"strictPropertyInitialization": false,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue