File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
tests/test-cases/export-interface Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11export interface Interface {
22 publicMethod ( opts : Options , b : number ) : void ;
33 publicProperty : number ;
4+ get publicGetter ( ) : string ;
45}
56
67export interface Options {
@@ -17,10 +18,14 @@ class Class implements Interface {
1718 foo : 321 ,
1819 } ;
1920
20- this . privateMethod ( this . publicProperty , opts1 . foo ) ;
21+ this . privateMethod ( this . publicProperty , this . publicGetter , opts1 . foo ) ;
2122 }
2223
23- private privateMethod ( a : string | number , b ?: number ) : void { }
24+ public get publicGetter ( ) : string {
25+ return '123' ;
26+ }
27+
28+ private privateMethod ( a : string | number , c : string , b ?: number ) : void { }
2429}
2530
2631export function createClass ( ) : Interface {
Original file line number Diff line number Diff line change @@ -10,9 +10,16 @@ var Class = /** @class */ (function () {
1010 var opts1 = {
1111 foo : 321 ,
1212 } ;
13- this . _private_privateMethod ( this . publicProperty , opts1 . foo ) ;
13+ this . _private_privateMethod ( this . publicProperty , this . publicGetter , opts1 . foo ) ;
1414 } ;
15- Class . prototype . _private_privateMethod = function ( a , b ) { } ;
15+ Object . defineProperty ( Class . prototype , "publicGetter" , {
16+ get : function ( ) {
17+ return '123' ;
18+ } ,
19+ enumerable : false ,
20+ configurable : true
21+ } ) ;
22+ Class . prototype . _private_privateMethod = function ( a , c , b ) { } ;
1623 return Class ;
1724} ( ) ) ;
1825function createClass ( ) {
You can’t perform that action at this time.
0 commit comments