Merge pull request #7 from ttshivers/typescript
build: stricter typescript
This commit is contained in:
commit
7a05621645
4 changed files with 47 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ npm-debug.log
|
||||||
|
|
||||||
# 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 @@
|
||||||
{
|
{
|
||||||
|
"include": [
|
||||||
|
"lib/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
],
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"display": "Node 18 + Strictest",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"lib": [
|
||||||
|
"es2022"
|
||||||
|
],
|
||||||
"module": "commonjs",
|
"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,
|
"declaration": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"noLib": false,
|
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"esModuleInterop": true,
|
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"target": "es6",
|
"allowSyntheticDefaultImports": true,
|
||||||
"sourceMap": false,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./lib",
|
"rootDir": "./lib",
|
||||||
"skipLibCheck": true,
|
"incremental": true,
|
||||||
},
|
"strictPropertyInitialization": false,
|
||||||
"include": ["lib/**/*"],
|
"resolveJsonModule": true
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue