Add null type annotations for the common x: T = null pattern

In these cases, the programmer has explicitly indicated that the type should be nullable
This commit is contained in:
Matt Bierner
2018-10-11 14:13:20 -07:00
parent da546f5d5d
commit 0318e90c93
130 changed files with 257 additions and 221 deletions
+2 -2
View File
@@ -99,8 +99,8 @@ export function parseLineAndColumnAware(rawPath: string): IPathWithLineAndColumn
const segments = rawPath.split(':'); // C:\file.txt:<line>:<column>
let path: string;
let line: number = null;
let column: number = null;
let line: number | null = null;
let column: number | null = null;
segments.forEach(segment => {
const segmentAsNumber = Number(segment);