Skip to content

Commit 9ae8db5

Browse files
feat(strict): show boolean values in type definitions
Adding `as const` will cause the generated type definitions to show `false` instead of `boolean`, which is helpful for developers exploring the config's contents via intellisense.
1 parent 3f32a30 commit 9ae8db5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/configs/strict.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export const createStrictConfig = (
1717
'rxjs-x/no-ignored-observable': 'error',
1818
'rxjs-x/no-ignored-replay-buffer': 'error',
1919
'rxjs-x/no-ignored-takewhile-value': 'error',
20-
'rxjs-x/no-implicit-any-catch': ['error', { allowExplicitAny: false }],
20+
'rxjs-x/no-implicit-any-catch': ['error', {
21+
allowExplicitAny: false as const,
22+
}],
2123
'rxjs-x/no-index': 'error',
2224
'rxjs-x/no-internal': 'error',
2325
'rxjs-x/no-nested-subscribe': 'error',
@@ -31,6 +33,9 @@ export const createStrictConfig = (
3133
'rxjs-x/no-unsafe-takeuntil': 'error',
3234
'rxjs-x/prefer-observer': 'error',
3335
'rxjs-x/prefer-root-operators': 'error',
34-
'rxjs-x/throw-error': ['error', { allowThrowingAny: false, allowThrowingUnknown: false }],
36+
'rxjs-x/throw-error': ['error', {
37+
allowThrowingAny: false as const,
38+
allowThrowingUnknown: false as const,
39+
}],
3540
},
3641
} satisfies TSESLint.FlatConfig.Config);

0 commit comments

Comments
 (0)