diff --git a/angular-wizard/index.d.ts b/angular-wizard/index.d.ts index 347a130827..918d8bf476 100644 --- a/angular-wizard/index.d.ts +++ b/angular-wizard/index.d.ts @@ -3,36 +3,40 @@ // Definitions by: Marko Jurisic , Ronald Wildenberg // 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; + } } } diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 40b6dc0c76..74a13611ee 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -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; +} diff --git a/bardjs/bardjs-tests.ts b/bardjs/bardjs-tests.ts index 4dad9b9ad9..50a9ae3a49 100644 --- a/bardjs/bardjs-tests.ts +++ b/bardjs/bardjs-tests.ts @@ -2,6 +2,8 @@ /// /// +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; diff --git a/i18next-sprintf-postprocessor/index.d.ts b/i18next-sprintf-postprocessor/index.d.ts index 566bb3e2d4..735f0dd60f 100644 --- a/i18next-sprintf-postprocessor/index.d.ts +++ b/i18next-sprintf-postprocessor/index.d.ts @@ -5,15 +5,15 @@ /// -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; diff --git a/promise-pg/promise-pg-tests.ts b/promise-pg/promise-pg-tests.ts index 5c962a3c09..999fe571fc 100644 --- a/promise-pg/promise-pg-tests.ts +++ b/promise-pg/promise-pg-tests.ts @@ -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();