Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Accept new baselines
  • Loading branch information
ahejlsberg committed Nov 17, 2017
commit 6ba8c57d97afdf78c76c90c8857cf07329eb8893
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,13 @@ tests/cases/conformance/classes/propertyMemberDeclarations/strictPropertyInitial
"b": number;
0: number;
}

// No strict initialization checks for abstract members

abstract class C9 {
abstract a: number;
abstract b: number | undefined;
abstract c: number | null;
abstract d?: number;
}

21 changes: 21 additions & 0 deletions tests/baselines/reference/strictPropertyInitialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ class C8 {
"b": number;
0: number;
}

// No strict initialization checks for abstract members

abstract class C9 {
abstract a: number;
abstract b: number | undefined;
abstract c: number | null;
abstract d?: number;
}


//// [strictPropertyInitialization.js]
Expand Down Expand Up @@ -131,6 +140,12 @@ var C8 = /** @class */ (function () {
}
return C8;
}());
// No strict initialization checks for abstract members
var C9 = /** @class */ (function () {
function C9() {
}
return C9;
}());


//// [strictPropertyInitialization.d.ts]
Expand Down Expand Up @@ -174,3 +189,9 @@ declare class C8 {
"b": number;
0: number;
}
declare abstract class C9 {
abstract a: number;
abstract b: number | undefined;
abstract c: number | null;
abstract d?: number;
}
18 changes: 18 additions & 0 deletions tests/baselines/reference/strictPropertyInitialization.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,21 @@ class C8 {
0: number;
}

// No strict initialization checks for abstract members

abstract class C9 {
>C9 : Symbol(C9, Decl(strictPropertyInitialization.ts, 73, 1))

abstract a: number;
>a : Symbol(C9.a, Decl(strictPropertyInitialization.ts, 77, 19))

abstract b: number | undefined;
>b : Symbol(C9.b, Decl(strictPropertyInitialization.ts, 78, 23))

abstract c: number | null;
>c : Symbol(C9.c, Decl(strictPropertyInitialization.ts, 79, 35))

abstract d?: number;
>d : Symbol(C9.d, Decl(strictPropertyInitialization.ts, 80, 30))
}

19 changes: 19 additions & 0 deletions tests/baselines/reference/strictPropertyInitialization.types
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,22 @@ class C8 {
0: number;
}

// No strict initialization checks for abstract members

abstract class C9 {
>C9 : C9

abstract a: number;
>a : number

abstract b: number | undefined;
>b : number | undefined

abstract c: number | null;
>c : number | null
>null : null

abstract d?: number;
>d : number | undefined
}