10000 Merge branch 'feature/strict-typescript' into develop · wimpyprogrammer/strings-to-regex@b7dff28 · GitHub
[go: up one dir, main page]

Skip to content

Commit b7dff28

Browse files
Merge branch 'feature/strict-typescript' into develop
2 parents 29c12a2 + 74e3f7c commit b7dff28

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

demo/src/demo.ts

Copy file name to clipboard
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function generatePattern(words: string): RegExp {
4141
return pattern;
4242
}
4343

44-
let clearSuccessIndicatorHandle: number;
44+
let clearSuccessIndicatorHandle: NodeJS.Timeout;
4545
function displayPattern(pattern: RegExp): void {
4646
$output.value = pattern.toString();
4747
$output.dispatchEvent(new Event('input'));

demo/src/utils/wordList.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('parseString', () => {
1414
expect(wordList).toEqual([]);
1515
}
1616

17-
['', null, undefined].forEach(testInput);
17+
['', null, undefined].forEach(val => testInput(val as string));
1818
});
1919

2020
it('returns entire input string in array when delimiter is empty', () => {
@@ -23,7 +23,7 @@ describe('parseString', () => {
2323
expect(wordList).toEqual([' some input string ']);
2424
}
2525

26-
['', null, undefined].forEach(testDelimiter);
26+
['', null, undefined].forEach(val => testDelimiter(val as string));
2727
});
2828

2929
it('returns entire input string in array when delimiter is not present in input string', () => {

demo/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ module.exports = {
1313
{
1414
loader: 'ts-loader',
1515
options: {
16-
compilerOptions: { noEmit: false },
16+
compilerOptions: {
17+
checkJs: false, // workaround for TypeStrong/ts-loader#702
18+
noEmit: false,
19+
},
1720
configFile: resolve(__dirname, './tsconfig.json'),
1821
},
1922
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@types/escape-string-regexp": "^1.0.0",
4444
"@types/jest": "^24.0.18",
4545
"@types/jest-when": "^2.7.0",
46+
"@types/node": "^12.7.5",
4647
"@typescript-eslint/eslint-plugin": "^2.2.0",
4748
"@typescript-eslint/parser": "^2.2.0",
4849
"eslint": "6.1.0",

tsconfig.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"compilerOptions": {
33
"allowJs": true,
44
"baseUrl": "./",
5+
"checkJs": true,
56
"downlevelIteration": true,
67
"esModuleInterop": true,
8+
"forceConsistentCasingInFileNames": true,
79
"rootDir": "./",
810
"lib": [
911
"es5",
@@ -13,13 +15,14 @@
1315
"es2017.object"
1416
],
1517
"module": "es2015",
18+
"moduleResolution": "node",
1619
"noEmit": true,
17-
"noImplicitAny": true,
20+
"noImplicitReturns": true,
1821
"noUnusedLocals": true,
1922
"noUnusedParameters": true,
2023
"pretty": true,
21-
"skipLibCheck": true,
22-
"sourceMap": true
24+
"sourceMap": true,
25+
"strict": true
2326
},
2427
"include": ["src"]
2528
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,11 @@
939939
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
940940
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
941941

942+
"@types/node@^12.7.5":
943+
version "12.7.5"
944+
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f"
945+
integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w==
946+
942947
"@types/stack-utils@^1.0.1":
943948
version "1.0.1"
944949
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"

0 commit comments

Comments
 (0)
0