-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for probleem caused by how babel interprets TS access modifiers
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
__testfixtures__/method-constructor-logparams-access-modifier.input.ts
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,23 @@ | ||
class BaseClass { | ||
|
||
public items:number[]; | ||
|
||
constructor(private paramOne:number, private paramTwo:number) { | ||
this.items = [paramOne, paramTwo]; | ||
} | ||
|
||
mathOperation(): number { | ||
return this.items[0] + this.items[1]; | ||
} | ||
} | ||
|
||
class Subclass extends BaseClass { | ||
|
||
constructor(private paramOne:number, private paramTwo:number) { | ||
super(paramOne, paramTwo); | ||
} | ||
|
||
mathOperation(): number { | ||
return this.items[0] * this.items[1]; | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
__testfixtures__/method-constructor-logparams-access-modifier.output.ts
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,61 @@ | ||
class BaseClass { | ||
|
||
public items:number[]; | ||
|
||
constructor(private paramOne:number, private paramTwo:number) { | ||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:5:constructor()" | ||
); | ||
|
||
console.log( | ||
`[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:5::param paramOne value: | ||
${JSON.stringify(paramOne)}` | ||
); | ||
|
||
console.log( | ||
`[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:5::param paramTwo value: | ||
${JSON.stringify(paramTwo)}` | ||
); | ||
|
||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:6" | ||
); | ||
|
||
this.items = [paramOne, paramTwo]; | ||
} | ||
|
||
mathOperation(): number { | ||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:9:mathOperation()" | ||
); | ||
|
||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:10" | ||
); | ||
|
||
return this.items[0] + this.items[1]; | ||
} | ||
} | ||
|
||
class Subclass extends BaseClass { | ||
|
||
constructor(private paramOne:number, private paramTwo:number) { | ||
super(paramOne, paramTwo); | ||
|
||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:16:constructor()" | ||
); | ||
} | ||
|
||
mathOperation(): number { | ||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:20:mathOperation()" | ||
); | ||
|
||
console.log( | ||
"[logitall] __testfixtures__/method-constructor-logparams-access-modifier.input.ts:21" | ||
); | ||
|
||
return this.items[0] * this.items[1]; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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