1// @module: amd 2// @declaration: true 3// @target: es5 4module MsPortalFx.ViewModels.Dialogs { 5 6 export const enum DialogResult { 7 Abort, 8 Cancel, 9 Ignore, 10 No, 11 Ok, 12 Retry, 13 Yes, 14 } 15 16 export interface DialogResultCallback { 17 (result: MsPortalFx.ViewModels.Dialogs.DialogResult): void; 18 } 19 20 export function someExportedFunction() { 21 } 22 23 export const enum MessageBoxButtons { 24 AbortRetryIgnore, 25 OK, 26 OKCancel, 27 RetryCancel, 28 YesNo, 29 YesNoCancel, 30 } 31} 32 33 34module MsPortalFx.ViewModels { 35 36 /** 37 * For some reason javascript code is emitted for this re-exported const enum. 38 */ 39 export import ReExportedEnum = Dialogs.DialogResult; 40 41 /** 42 * Not exported to show difference. No javascript is emmitted (as expected) 43 */ 44 import DialogButtons = Dialogs.MessageBoxButtons; 45 46 /** 47 * Re-exporting a function type to show difference. No javascript is emmitted (as expected) 48 */ 49 export import Callback = Dialogs.DialogResultCallback; 50 51 export class SomeUsagesOfTheseConsts { 52 constructor() { 53 // these do get replaced by the const value 54 const value1 = ReExportedEnum.Cancel; 55 console.log(value1); 56 const value2 = DialogButtons.OKCancel; 57 console.log(value2); 58 } 59 } 60} 61