Fix linter (#17312)

We just merged a change which makes the `.types` member of a union or intersection type a readonly array. Our lint rule's type annotation needs to reflect that.
This commit is contained in:
Wesley Wigham
2017-07-19 17:06:31 -07:00
committed by GitHub
parent f37d9068ff
commit ed87b40902

View File

@@ -19,7 +19,7 @@ function walk(ctx: Lint.WalkContext<void>): void {
ts.forEachChild(node, recur);
}
function check(types: ts.TypeNode[]): void {
function check(types: ReadonlyArray<ts.TypeNode>): void {
let expectedStart = types[0].end + 2; // space, | or &
for (let i = 1; i < types.length; i++) {
const currentType = types[i];