This repository was archived by the owner on Nov 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ export async function checkTsconfig(dirPath: string, dt: DefinitelyTypedInfo | u
8282 case "lib" :
8383 case "noImplicitAny" :
8484 case "noImplicitThis" :
85+ case "strict" :
8586 case "strictNullChecks" :
8687 case "strictFunctionTypes" :
8788 case "esModuleInterop" :
@@ -109,7 +110,17 @@ export async function checkTsconfig(dirPath: string, dt: DefinitelyTypedInfo | u
109110 throw new Error ( 'Must specify "lib", usually to `"lib": ["es6"]` or `"lib": ["es6", "dom"]`.' ) ;
110111 }
111112
112- if ( ! ( "strict" in options ) ) {
113+ if ( "strict" in options ) {
114+ if ( options . strict !== true ) {
115+ throw new Error ( 'When "strict" is present, it must be set to `true`.' ) ;
116+ }
117+
118+ for ( const key of [ "noImplicitAny" , "noImplicitThis" , "strictNullChecks" , "strictFunctionTypes" ] ) {
119+ if ( key in options ) {
120+ throw new TypeError ( `Expected "${ key } " to not be set when "strict" is \`true\`.` ) ;
121+ }
122+ }
123+ } else {
113124 for ( const key of [ "noImplicitAny" , "noImplicitThis" , "strictNullChecks" , "strictFunctionTypes" ] ) {
114125 if ( ! ( key in options ) ) {
115126 throw new Error ( `Expected \`"${ key } ": true\` or \`"${ key } ": false\`.` ) ;
You can’t perform that action at this time.
0 commit comments