build: stricter typescript
Stricter typescript
This commit is contained in:
parent
729d92d3ef
commit
fa47be84e0
4 changed files with 47 additions and 22 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -16,4 +16,5 @@ npm-debug.log
|
||||||
/.nyc_output
|
/.nyc_output
|
||||||
|
|
||||||
# dist
|
# dist
|
||||||
dist
|
dist
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
|
|
@ -46,7 +46,7 @@ export class HttpModule {
|
||||||
static registerAsync(options: HttpModuleAsyncOptions): DynamicModule {
|
static registerAsync(options: HttpModuleAsyncOptions): DynamicModule {
|
||||||
return {
|
return {
|
||||||
module: HttpModule,
|
module: HttpModule,
|
||||||
imports: options.imports,
|
...(options.imports && {imports: options.imports}),
|
||||||
providers: [
|
providers: [
|
||||||
...this.createAsyncProviders(options),
|
...this.createAsyncProviders(options),
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ export class HttpModule {
|
||||||
provide: HTTP_MODULE_OPTIONS,
|
provide: HTTP_MODULE_OPTIONS,
|
||||||
useFactory: async (optionsFactory: HttpModuleOptionsFactory) =>
|
useFactory: async (optionsFactory: HttpModuleOptionsFactory) =>
|
||||||
optionsFactory.createHttpOptions(),
|
optionsFactory.createHttpOptions(),
|
||||||
inject,
|
...(inject && {inject}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,7 @@ export class HttpService {
|
||||||
this.put = this.instance.put;
|
this.put = this.instance.put;
|
||||||
this.post = this.instance.post;
|
this.post = this.instance.post;
|
||||||
this.patch = this.instance.patch;
|
this.patch = this.instance.patch;
|
||||||
this.head = this.instance.head;
|
this.head = this.instance.head as typeof Axios.patch;
|
||||||
this.head = this.instance.head;
|
|
||||||
this.delete = this.instance.delete;
|
this.delete = this.instance.delete;
|
||||||
this.get = this.instance.get;
|
this.get = this.instance.get;
|
||||||
this.request = this.instance.request;
|
this.request = this.instance.request;
|
||||||
|
|
|
@ -1,19 +1,44 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"include": [
|
||||||
"module": "commonjs",
|
"lib/**/*"
|
||||||
"declaration": true,
|
],
|
||||||
"removeComments": true,
|
"exclude": [
|
||||||
"noLib": false,
|
"node_modules"
|
||||||
"emitDecoratorMetadata": true,
|
],
|
||||||
"esModuleInterop": true,
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"experimentalDecorators": true,
|
"display": "Node 18 + Strictest",
|
||||||
"target": "es6",
|
"compilerOptions": {
|
||||||
"sourceMap": false,
|
"lib": [
|
||||||
"outDir": "./dist",
|
"es2022"
|
||||||
"rootDir": "./lib",
|
],
|
||||||
"skipLibCheck": true,
|
"module": "commonjs",
|
||||||
},
|
"target": "es2022",
|
||||||
"include": ["lib/**/*"],
|
"strict": true,
|
||||||
"exclude": ["node_modules"]
|
"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