Skip to content

Commit 78a1ca7

Browse files
committed
Make setting properties explicit instead of using parameter properties
1 parent 767da71 commit 78a1ca7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/services/services.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,17 @@ namespace ts {
348348

349349
class TokenOrIdentifierObject implements Token {
350350
public kind: SyntaxKind;
351+
public pos: number;
352+
public end: number;
351353
public flags: NodeFlags;
352354
public parent: Node;
353355
public jsDocComments: JSDocComment[];
354356
public __tokenTag: any;
355357

356-
constructor(public pos: number, public end: number) {
358+
constructor(pos: number, end: number) {
359+
// Set properties in same order as NodeObject
360+
this.pos = pos;
361+
this.end = end;
357362
this.flags = NodeFlags.None;
358363
this.parent = undefined;
359364
}
@@ -416,8 +421,10 @@ namespace ts {
416421
}
417422

418423
class TokenObject extends TokenOrIdentifierObject {
419-
constructor(public kind: SyntaxKind, pos: number, end: number) {
424+
public kind: SyntaxKind;
425+
constructor(kind: SyntaxKind, pos: number, end: number) {
420426
super(pos, end);
427+
this.kind = kind;
421428
}
422429
}
423430

0 commit comments

Comments
 (0)