DefinitelyTyped/types/angular-wizard/index.d.ts
Chris Yungmann 6b2775d9b4 [jasmine] make SpyObjMethodNames more strongly-typed
When a generic type argument is provided, require the method names array
to only include keys of the generic type argument and for the object
syntax, additionally require that the setup returned type matches the
return type of the method. Requires TS 2.8 for conditional types.
2018-10-26 12:35:01 -05:00

44 lines
1.2 KiB
TypeScript

// Type definitions for Angular Wizard 0.6.1
// Project: https://github.com/mgonto/angular-wizard
// Definitions by: Marko Jurisic <https://github.com/mjurisic>, Ronald Wildenberg <https://github.com/rwwilden>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as angular from 'angular';
declare module 'angular' {
export namespace mgoAngularWizard {
interface WizardHandler {
wizard(name?: string): Wizard;
addWizard(name: string, wizard: Wizard): void;
removeWizard(name: string): void;
}
interface Wizard {
next(nextHandler?: () => boolean): void;
previous(): void;
cancel: () => void;
goTo(step: number | string): void;
finish(): void;
reset: () => void;
addStep: (step: WzStep) => void;
currentStep: () => WzStep;
currentStepNumber(): number;
currentStepDescription: () => string;
currentStepTitle: () => string;
getEnabledSteps(): WzStep[];
}
interface WzStep {
canenter: (...args: any[]) => boolean;
canexit: (...args: any[]) => boolean;
description: string;
selected: boolean;
title: string;
wzData: any;
wzTitle: string;
}
}
}