@@ -300,25 +300,26 @@ test('class type var', () => {
300
300
} ,
301
301
} ) ;
302
302
303
- // TODO: how to resolve the typeof imports? -> __assignType(Subscriber_1.Subscriber, __ΩSubscriber)
304
- // "use strict";
305
- // Object.defineProperty(exports, "__esModule", { value: true });
306
- // exports.__ΩUnsubscribable = exports.__ΩSubscribable = exports.__ΩSubscription = exports.__ΩObserver = exports.__ΩTeardownLogic = exports.__ΩSubscriber = exports.__ΩOperator = exports.__ΩObservable = void 0;
307
- // const __ΩObservable = ['T', () => Observable, 'source', () => __ΩOperator, 'operator', () => Observable, 'this', () => __assignType(Subscriber_1.Subscriber, __ΩSubscriber), 'subscriber', () => __ΩTeardownLogic, '', 'subscribe', 'constructor', 'args', 'create', () => __ΩOperator, () => Observable, 'lift', () => __ΩPartial, () => __ΩObserver, 'observer', () => __assignType(Subscription_1.Subscription, __ΩSubscription), 'value', 'next', 'forEach', () => Observable, 'pipe', 'toPromise', () => __ΩSubscribable, 'Observable', 'b!PP"7"-J3#P"e"!o$#-J3%PPPe$!7&2\'Pe$!7(2)n*/+2,8"0-P"@2."/+3/sPe"!"o0#2%8P"7102Pe"!o4"o3"258P760,PPe#!27$/+28$`09PPe#!7:0;PPe#!-J`0<5e!!o="x"w>y'];
308
- // exports.__ΩObservable = __ΩObservable;
309
- // const __ΩOperator = ['T', 'R', () => Subscriber_2.Subscriber, 'subscriber', 'source', () => __ΩTeardownLogic, 'call', 'b!b"PPPe$"7#2$"2%n&1\'My'];
310
- // exports.__ΩOperator = __ΩOperator;
311
- // const __ΩSubscriber = ['T', () => Subscription_2.Subscription, 'x', '', 'next', 'e', 'error', 'complete', () => Subscriber, 'create', 'isStopped', () => Subscriber, () => __ΩObserver, 'destination', () => Subscriber, () => __ΩObserver, 'constructor', 'value', 'err', 'unsubscribe', '_next', '_error', '_complete', () => __ΩObserver, 'Subscriber', 'b!P7"PPe#!2#8$/$2%8P"2&8$/$2\'8P$/$2(8Pe#!7)0*s)3+<PP"7,"o-"J3.<PPP"7/"o0"J2.8"01Pe"!228$0%P"238$0\'P$0(P$04Pe"!22$05<P"23$06<P$07<5e!!o8"x"w9y'];
312
- // exports.__ΩSubscriber = __ΩSubscriber;
313
- // const __ΩTeardownLogic = [() => Subscription_3.Subscription, () => __ΩUnsubscribable, '', 'PP7!n"P$/#$Jy'];
314
- // exports.__ΩTeardownLogic = __ΩTeardownLogic;
303
+ console . log ( res . app ) ;
304
+
305
+ // TODO: how to resolve the typeof imports? -> __assignType(Subscriber_1.Subscriber, __ɵΩSubscriber)
306
+ //
307
+ // exports.__ΩUnsubscribable = exports.__ɵΩSubscribable = exports.__ɵΩSubscription = exports.__ɵΩObserver = exports.__ɵΩTeardownLogic = exports.__ɵΩSubscriber = exports.__ɵΩOperator = exports.__ɵΩObservable = void 0;
308
+ // const __ɵΩObservable = ['T', () => Observable, 'source', () => __ΩOperator, 'operator', () => Observable, 'this', () => __assignType(Subscriber_1.Subscriber, __ɵΩSubscriber), 'subscriber', () => __ΩTeardownLogic, '', 'subscribe', 'constructor', 'args', 'create', () => __ɵΩOperator, () => Observable, 'lift', () => __ΩPartial, () => __ΩObserver, 'observer', () => __assignType(Subscription_1.Subscription, __ɵΩSubscription), 'value', 'next', 'forEach', () => Observable, 'pipe', 'toPromise', () => __ΩSubscribable, 'Observable', 'b!PP"7"-J3#P"e"!o$#-J3%PPPe$!7&2\'Pe$!7(2)n*/+2,8"0-P"@2."/+3/sPe"!"o0#2%8P"7102Pe"!o4"o3"258P760,PPe#!27$/+28$`09PPe#!7:0;PPe#!-J`0<5e!!o="x"w>y'];
309
+ // exports.__ɵΩObservable = __ɵΩObservable;
310
+ // const __ɵΩOperator = ['T', 'R', () => Subscriber_2.Subscriber, 'subscriber', 'source', () => __ɵΩTeardownLogic, 'call', 'b!b"PPPe$"7#2$"2%n&1\'My'];
311
+ // exports.__ɵΩOperator = __ɵΩOperator;
312
+ // const __ɵΩSubscriber = ['T', () => Subscription_2.Subscription, 'x', '', 'next', 'e', 'error', 'complete', () => Subscriber, 'create', 'isStopped', () => Subscriber, () => __ɵΩObserver, 'destination', () => Subscriber, () => __ɵΩObserver, 'constructor', 'value', 'err', 'unsubscribe', '_next', '_error', '_complete', () => __ɵΩObserver, 'Subscriber', 'b!P7"PPe#!2#8$/$2%8P"2&8$/$2\'8P$/$2(8Pe#!7)0*s)3+<PP"7,"o-"J3.<PPP"7/"o0"J2.8"01Pe"!228$0%P"238$0\'P$0(P$04Pe"!22$05<P"23$06<P$07<5e!!o8"x"w9y'];
313
+ // exports.__ɵΩSubscriber = __ɵΩSubscriber;
314
+ // const __ɵΩTeardownLogic = [() => Subscription_3.Subscription, () => __ΩUnsubscribable, '', 'PP7!n"P$/#$Jy'];
315
+ // exports.__ɵΩTeardownLogic = __ɵΩTeardownLogic;
315
316
// const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
316
- // const __ΩObserver = ['T', 'value', '', 'next', 'err', 'error', 'complete', 'b!PPe#!2"$/#4$P"2%$/#4&P$/#4\'My'];
317
- // exports.__ΩObserver = __ΩObserver ;
318
- // const __ΩSubscription = [() => Subscription, 'EMPTY', 'closed', '', 'initialTeardown', 'constructor', 'unsubscribe', () => __ΩTeardownLogic , 'teardown', 'add', () => __ΩExclude, () => __ΩTeardownLogic , 'remove', 'Subscription', 'P7!3"s)3#PPP$/$-J2%8"0&P$0\'Pn(2)$0*Pn,$o+#2)$0-5x"w.y'];
319
- // exports.__ΩSubscription = __ΩSubscription ;
320
- // const __ΩSubscribable = ['T', () => __ΩPartial, () => __ΩObserver , 'observer', () => __ΩUnsubscribable, 'subscribe', 'b!PPe#!o#"o""2$n%1&My'];
321
- // exports.__ΩSubscribable = __ΩSubscribable ;
317
+ // const __ɵΩObserver = ['T', 'value', '', 'next', 'err', 'error', 'complete', 'b!PPe#!2"$/#4$P"2%$/#4&P$/#4\'My'];
318
+ // exports.__ɵΩObserver = __ɵΩObserver ;
319
+ // const __ɵΩSubscription = [() => Subscription, 'EMPTY', 'closed', '', 'initialTeardown', 'constructor', 'unsubscribe', () => __ɵΩTeardownLogic , 'teardown', 'add', () => __ΩExclude, () => __ɵΩTeardownLogic , 'remove', 'Subscription', 'P7!3"s)3#PPP$/$-J2%8"0&P$0\'Pn(2)$0*Pn,$o+#2)$0-5x"w.y'];
320
+ // exports.__ɵΩSubscription = __ɵΩSubscription ;
321
+ // const __ɵΩSubscribable = ['T', () => __ΩPartial, () => __ɵΩObserver , 'observer', () => __ΩUnsubscribable, 'subscribe', 'b!PPe#!o#"o""2$n%1&My'];
322
+ // exports.__ɵΩSubscribable = __ɵΩSubscribable ;
322
323
// const __ΩUnsubscribable = ['unsubscribe', 'PP$1!My'];
323
324
// exports.__ΩUnsubscribable = __ΩUnsubscribable;
324
325
// const __ΩExclude = ['T', 'U', 'l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)y'];
@@ -327,11 +328,32 @@ test('class type var', () => {
327
328
// return fn;
328
329
// }
329
330
// const rxjs_1 = require("rxjs");
330
- // const __ΩA = [() => __assignType(rxjs_1.Observable, __ΩObservable ), 'P#7!y'];
331
+ // const __ΩA = [() => __assignType(rxjs_1.Observable, __ɵΩObservable ), 'P#7!y'];
331
332
332
- expect ( res . app ) . toContain ( 'const __ΩObservable = [' ) ;
333
- expect ( res . app ) . toContain ( '() => __assignType(rxjs_1.Observable, __ΩObservable)' ) ;
333
+ expect ( res . app ) . toContain ( 'const __ɵΩObservable = [' ) ;
334
+ expect ( res . app ) . toContain ( '() => __assignType(rxjs_1.Observable, __ɵΩObservable)' ) ;
335
+ // FIXME: why isn't it being prefixed with `ɵ`?
336
+ expect ( res . app ) . toContain ( 'const __ɵΩUnsubscribable = [' ) ;
334
337
} )
338
+
339
+ test ( 'runtime type name clashing' , ( ) => {
340
+ const res = transpile ( {
341
+ app : `import { Observable } from 'rxjs';
342
+
343
+ type Subscribable = any;
344
+
345
+ type A = Observable<unknown>;
346
+ `
347
+ } , undefined , {
348
+ inlineExternalLibraryImports : {
349
+ 'rxjs' : [ 'Observable' ] ,
350
+ } ,
351
+ } ) ;
352
+
353
+ expect ( res . app ) . toContain ( 'const __ɵΩSubscribable = [' ) ;
354
+ expect ( res . app ) . toContain ( 'const __ΩSubscribable = [' ) ;
355
+ } )
356
+
335
357
test ( 'class typeOf' , ( ) => {
336
358
const res = transpileAndRun ( {
337
359
app : `import { Observable } from 'rxjs';
0 commit comments