account for hwen amd is not used, it is still added to ko static

This commit is contained in:
flyfishMT
2016-03-01 16:54:43 -07:00
parent de29bbf60b
commit b82ebfaac5
2 changed files with 12 additions and 0 deletions
+8
View File
@@ -24,6 +24,13 @@ interface KoLiteCommandOptions {
canExecute?: (isExecuting: boolean) => any;
}
// when not AMD, add to ko object
interface KnockoutStatic {
command(options: KoLiteCommandOptions): KoliteCommand;
asyncCommand(options: KoLiteCommandOptions): KoliteAsyncCommand;
}
// when using AMD, it is exported
interface KnockoutCommandStatic {
command(options: KoLiteCommandOptions): KoliteCommand;
asyncCommand(options: KoLiteCommandOptions): KoliteAsyncCommand;
@@ -37,6 +44,7 @@ interface KnockoutBindingHandlers {
command: KnockoutBindingHandler;
}
// Ambient declarations for typescript+requirejs
declare var kocommand: KnockoutCommandStatic;
declare module 'kocommand'{
export = kocommand;
+4
View File
@@ -15,6 +15,10 @@ interface DirtyFlag {
reset(): void;
}
interface KnockoutStatic {
DirtyFlag: DirtyFlag;
}
interface KnockoutDirtyFlagStatic {
DirtyFlag: DirtyFlag;
}