-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: f3bf29a fix(44273): preserves 'override' modifier in JavaScript output Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
- Loading branch information
1 parent
e425f57
commit 4f7fe4a
Showing
25 changed files
with
574 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//// [override16.ts] | ||
class A { | ||
foo?: string; | ||
} | ||
|
||
class B extends A { | ||
override foo = "string"; | ||
} | ||
|
||
|
||
//// [override16.js] | ||
class A { | ||
} | ||
class B extends A { | ||
constructor() { | ||
super(...arguments); | ||
this.foo = "string"; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/override16(target=es2015).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
foo?: string; | ||
>foo : Symbol(A.foo, Decl(override16.ts, 0, 9)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override16.ts, 2, 1)) | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
override foo = "string"; | ||
>foo : Symbol(B.foo, Decl(override16.ts, 4, 19)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : A | ||
|
||
foo?: string; | ||
>foo : string | ||
} | ||
|
||
class B extends A { | ||
>B : B | ||
>A : A | ||
|
||
override foo = "string"; | ||
>foo : string | ||
>"string" : "string" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//// [override16.ts] | ||
class A { | ||
foo?: string; | ||
} | ||
|
||
class B extends A { | ||
override foo = "string"; | ||
} | ||
|
||
|
||
//// [override16.js] | ||
class A { | ||
foo; | ||
} | ||
class B extends A { | ||
foo = "string"; | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/override16(target=esnext).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
foo?: string; | ||
>foo : Symbol(A.foo, Decl(override16.ts, 0, 9)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override16.ts, 2, 1)) | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
override foo = "string"; | ||
>foo : Symbol(B.foo, Decl(override16.ts, 4, 19)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : A | ||
|
||
foo?: string; | ||
>foo : string | ||
} | ||
|
||
class B extends A { | ||
>B : B | ||
>A : A | ||
|
||
override foo = "string"; | ||
>foo : string | ||
>"string" : "string" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//// [override16.ts] | ||
class A { | ||
foo?: string; | ||
} | ||
|
||
class B extends A { | ||
override foo = "string"; | ||
} | ||
|
||
|
||
//// [override16.js] | ||
class A { | ||
foo; | ||
} | ||
class B extends A { | ||
foo = "string"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
foo?: string; | ||
>foo : Symbol(A.foo, Decl(override16.ts, 0, 9)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override16.ts, 2, 1)) | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
override foo = "string"; | ||
>foo : Symbol(B.foo, Decl(override16.ts, 4, 19)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : A | ||
|
||
foo?: string; | ||
>foo : string | ||
} | ||
|
||
class B extends A { | ||
>B : B | ||
>A : A | ||
|
||
override foo = "string"; | ||
>foo : string | ||
>"string" : "string" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//// [override17.ts] | ||
class A { | ||
public m1(): number { | ||
return 0; | ||
} | ||
|
||
public m2(): number { | ||
return 0; | ||
} | ||
|
||
public m3(): void {} | ||
} | ||
|
||
class B extends A { | ||
override m1() { | ||
return 10; | ||
} | ||
|
||
override m2(): number { | ||
return 30; | ||
} | ||
|
||
override m3(): void {} | ||
} | ||
|
||
|
||
//// [override17.js] | ||
class A { | ||
m1() { | ||
return 0; | ||
} | ||
m2() { | ||
return 0; | ||
} | ||
m3() { } | ||
} | ||
class B extends A { | ||
m1() { | ||
return 10; | ||
} | ||
m2() { | ||
return 30; | ||
} | ||
m3() { } | ||
} |
40 changes: 40 additions & 0 deletions
40
tests/baselines/reference/override17(target=es2015).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
=== tests/cases/conformance/override/override17.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override17.ts, 0, 0)) | ||
|
||
public m1(): number { | ||
>m1 : Symbol(A.m1, Decl(override17.ts, 0, 9)) | ||
|
||
return 0; | ||
} | ||
|
||
public m2(): number { | ||
>m2 : Symbol(A.m2, Decl(override17.ts, 3, 5)) | ||
|
||
return 0; | ||
} | ||
|
||
public m3(): void {} | ||
>m3 : Symbol(A.m3, Decl(override17.ts, 7, 5)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override17.ts, 10, 1)) | ||
>A : Symbol(A, Decl(override17.ts, 0, 0)) | ||
|
||
override m1() { | ||
>m1 : Symbol(B.m1, Decl(override17.ts, 12, 19)) | ||
|
||
return 10; | ||
} | ||
|
||
override m2(): number { | ||
>m2 : Symbol(B.m2, Decl(override17.ts, 15, 5)) | ||
|
||
return 30; | ||
} | ||
|
||
override m3(): void {} | ||
>m3 : Symbol(B.m3, Decl(override17.ts, 19, 5)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
=== tests/cases/conformance/override/override17.ts === | ||
class A { | ||
>A : A | ||
|
||
public m1(): number { | ||
>m1 : () => number | ||
|
||
return 0; | ||
>0 : 0 | ||
} | ||
|
||
public m2(): number { | ||
>m2 : () => number | ||
|
||
return 0; | ||
>0 : 0 | ||
} | ||
|
||
public m3(): void {} | ||
>m3 : () => void | ||
} | ||
|
||
class B extends A { | ||
>B : B | ||
>A : A | ||
|
||
override m1() { | ||
>m1 : () => number | ||
|
||
return 10; | ||
>10 : 10 | ||
} | ||
|
||
override m2(): number { | ||
>m2 : () => number | ||
|
||
return 30; | ||
>30 : 30 | ||
} | ||
|
||
override m3(): void {} | ||
>m3 : () => void | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//// [override17.ts] | ||
class A { | ||
public m1(): number { | ||
return 0; | ||
} | ||
|
||
public m2(): number { | ||
return 0; | ||
} | ||
|
||
public m3(): void {} | ||
} | ||
|
||
class B extends A { | ||
override m1() { | ||
return 10; | ||
} | ||
|
||
override m2(): number { | ||
return 30; | ||
} | ||
|
||
override m3(): void {} | ||
} | ||
|
||
|
||
//// [override17.js] | ||
class A { | ||
m1() { | ||
return 0; | ||
} | ||
m2() { | ||
return 0; | ||
} | ||
m3() { } | ||
} | ||
class B extends A { | ||
m1() { | ||
return 10; | ||
} | ||
m2() { | ||
return 30; | ||
} | ||
m3() { } | ||
} |
40 changes: 40 additions & 0 deletions
40
tests/baselines/reference/override17(target=esnext).symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
=== tests/cases/conformance/override/override17.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override17.ts, 0, 0)) | ||
|
||
public m1(): number { | ||
>m1 : Symbol(A.m1, Decl(override17.ts, 0, 9)) | ||
|
||
return 0; | ||
} | ||
|
||
public m2(): number { | ||
>m2 : Symbol(A.m2, Decl(override17.ts, 3, 5)) | ||
|
||
return 0; | ||
} | ||
|
||
public m3(): void {} | ||
>m3 : Symbol(A.m3, Decl(override17.ts, 7, 5)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override17.ts, 10, 1)) | ||
>A : Symbol(A, Decl(override17.ts, 0, 0)) | ||
|
||
override m1() { | ||
>m1 : Symbol(B.m1, Decl(override17.ts, 12, 19)) | ||
|
||
return 10; | ||
} | ||
|
||
override m2(): number { | ||
>m2 : Symbol(B.m2, Decl(override17.ts, 15, 5)) | ||
|
||
return 30; | ||
} | ||
|
||
override m3(): void {} | ||
>m3 : Symbol(B.m3, Decl(override17.ts, 19, 5)) | ||
} | ||
|
Oops, something went wrong.