mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update index.d.ts removed fromjs overload that no longer exists in latest knockout.mapping, and added much better type safety for "fromJS". * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * fix for typescript version. * more typescript versioning fixes. * fix for minor bug. * yet another test fix. * yet another test fix.
53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
// Type definitions for KoLite 1.1
|
|
// Project: https://github.com/CodeSeven/kolite
|
|
// Definitions by: Boris Yankov <https://github.com/borisyankov>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
/// <reference types="jquery" />
|
|
/// <reference types="knockout" />
|
|
|
|
|
|
// Command /////////////////////////////////////////////
|
|
|
|
interface KoliteCommand {
|
|
canExecute: KnockoutComputed<boolean>;
|
|
execute(...args: any[]): any;
|
|
}
|
|
|
|
interface KoliteAsyncCommand extends KoliteCommand {
|
|
isExecuting: KnockoutObservable<boolean>;
|
|
}
|
|
|
|
interface KoLiteCommandOptions {
|
|
execute(...args: any[]): any;
|
|
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;
|
|
}
|
|
|
|
interface KnockoutUtils {
|
|
wrapAccessor(accessor: any): Function;
|
|
}
|
|
|
|
interface KnockoutBindingHandlers {
|
|
command: KnockoutBindingHandler;
|
|
}
|
|
|
|
// Ambient declarations for typescript+requirejs
|
|
declare var kocommand: KnockoutCommandStatic;
|
|
declare module 'kocommand'{
|
|
export = kocommand;
|
|
}
|
|
|