mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Final fixes
This commit is contained in:
60
angular-wizard/index.d.ts
vendored
60
angular-wizard/index.d.ts
vendored
@@ -3,36 +3,40 @@
|
||||
// Definitions by: Marko Jurisic <https://github.com/mjurisic>, Ronald Wildenberg <https://github.com/rwwilden>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace angular.mgoAngularWizard {
|
||||
interface WizardHandler {
|
||||
wizard(name?: string): Wizard;
|
||||
addWizard(name: string, wizard: Wizard): void;
|
||||
removeWizard(name: string): void;
|
||||
}
|
||||
import * as angular from 'angularjs';
|
||||
|
||||
interface Wizard {
|
||||
next(nextHandler?: () => boolean): void;
|
||||
previous(): void;
|
||||
cancel: () => void;
|
||||
goTo(step: number | string): void;
|
||||
finish(): void;
|
||||
reset: () => void;
|
||||
declare module 'angularjs' {
|
||||
export namespace mgoAngularWizard {
|
||||
interface WizardHandler {
|
||||
wizard(name?: string): Wizard;
|
||||
addWizard(name: string, wizard: Wizard): void;
|
||||
removeWizard(name: string): void;
|
||||
}
|
||||
|
||||
addStep: (step: WzStep) => void;
|
||||
currentStep: () => WzStep;
|
||||
currentStepNumber(): number;
|
||||
currentStepDescription: () => string;
|
||||
currentStepTitle: () => string;
|
||||
getEnabledSteps(): WzStep[];
|
||||
}
|
||||
interface Wizard {
|
||||
next(nextHandler?: () => boolean): void;
|
||||
previous(): void;
|
||||
cancel: () => void;
|
||||
goTo(step: number | string): void;
|
||||
finish(): void;
|
||||
reset: () => void;
|
||||
|
||||
interface WzStep {
|
||||
canenter: (...args: any[]) => boolean;
|
||||
canexit: (...args: any[]) => boolean;
|
||||
description: string;
|
||||
selected: boolean;
|
||||
title: string;
|
||||
wzData: any;
|
||||
wzTitle: string;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
angularjs/angular-mocks.d.ts
vendored
4
angularjs/angular-mocks.d.ts
vendored
@@ -340,4 +340,6 @@ declare module 'angularjs' {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//Use `angular.mock.module` instead of `module`, as `module` conflicts with commonjs.
|
||||
//declare var module: (...modules: any[]) => any;
|
||||
declare var inject: angular.IInjectStatic;
|
||||
declare global {
|
||||
export var inject: angular.IInjectStatic;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/// <reference types="chai" />
|
||||
/// <reference types="angularjs" />
|
||||
|
||||
import * as angular from 'angularjs';
|
||||
|
||||
namespace bardTests {
|
||||
var expect = chai.expect,
|
||||
assert = chai.assert;
|
||||
@@ -16,10 +18,12 @@ namespace bardTests {
|
||||
}
|
||||
}
|
||||
|
||||
myService.$inject = ['$q'];
|
||||
function myService($q: angular.IQService) {
|
||||
return new MyService($q);
|
||||
}
|
||||
namespace myService {
|
||||
export var $inject = ['$q'];
|
||||
}
|
||||
|
||||
class MyController {
|
||||
myProperty: string;
|
||||
|
||||
12
i18next-sprintf-postprocessor/index.d.ts
vendored
12
i18next-sprintf-postprocessor/index.d.ts
vendored
@@ -5,15 +5,15 @@
|
||||
|
||||
///<reference types="i18next"/>
|
||||
|
||||
declare namespace I18next {
|
||||
interface I18n {
|
||||
t(key: string, ...args: any[]): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "i18next-sprintf-postprocessor" {
|
||||
import i18next = require("i18next");
|
||||
|
||||
module "i18next" {
|
||||
interface I18n {
|
||||
t(key: string, ...args: any[]): string;
|
||||
}
|
||||
}
|
||||
|
||||
interface I18nextSprintfPostProcessor {
|
||||
name: string;
|
||||
type: string;
|
||||
|
||||
@@ -46,7 +46,7 @@ pg.connect(conString)
|
||||
buffer: true
|
||||
}).promise.then(
|
||||
function (result) { console.log(result.rows.length + " rows returned"); },
|
||||
function (err) { console.error("Error running query", err); throw err; },
|
||||
function (err): void { console.error("Error running query", err); throw err; },
|
||||
function (user: any) {} // called for each returned row
|
||||
).finally(done);
|
||||
}).done();
|
||||
|
||||
Reference in New Issue
Block a user