Skip to content

Commit 421df11

Browse files
Jason DentJason3S
Jason Dent
authored andcommitted
Turn on no implicit any
1 parent 5ebe16f commit 421df11

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

packages/cspell-tools/dist/text.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cspell-tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cspell-tools",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Tools to assist with the development of cSpell",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",

packages/cspell-tools/src/fileReader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function lineReaderRx(filename: string, encoding?: string): Rx.Observable
1515

1616
export function textFileStreamRx(filename: string, encoding: string = 'UTF-8'): Rx.Observable<string> {
1717
const subject = new Rx.Subject<string>();
18-
const fnError = (e) => subject.error(e);
18+
const fnError = (e: Error) => subject.error(e);
1919

2020
const pipes: stream.Transform[] = [];
2121
if (filename.match(/\.gz$/i)) {

packages/cspell-tools/src/text.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function extractWordsFromText(text: string): Sequence<WordOffset> {
101101
return matchToWordOffset(reg, text)
102102
// remove characters that match against \p{L} but are not letters (Chinese characters are an example).
103103
.map(wo => ({
104-
word: XRegExp.replace(wo.word, regExIgnoreCharacters, match => ' '.repeat(match.length)).trim(),
104+
word: XRegExp.replace(wo.word, regExIgnoreCharacters, (match: string) => ' '.repeat(match.length)).trim(),
105105
offset: wo.offset
106106
}))
107107
.filter(wo => !!wo.word);
@@ -167,11 +167,11 @@ export function matchCase(example: string, word: string): string {
167167
}
168168

169169

170-
export function isTextOffset(x): x is TextOffset {
170+
export function isTextOffset(x: any): x is TextOffset {
171171
return typeof x === 'object' && typeof x.text === 'string' && typeof x.offset === 'number';
172172
}
173173

174-
export function isWordOffset(x): x is WordOffset {
174+
export function isWordOffset(x: any): x is WordOffset {
175175
return typeof x === 'object' && typeof x.word === 'string' && typeof x.offset === 'number';
176176
}
177177

packages/cspell-tools/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"sourceMap": true,
77
"alwaysStrict": true,
88
"declaration": true,
9-
"noImplicitAny": false,
9+
"noImplicitAny": true,
1010
"noImplicitThis": true,
1111
"strictNullChecks": true,
1212
"outDir": "dist"

0 commit comments

Comments
 (0)