diff --git a/types/add-zero/add-zero-tests.ts b/types/add-zero/add-zero-tests.ts index ac0509d26d..852f1eddb9 100644 --- a/types/add-zero/add-zero-tests.ts +++ b/types/add-zero/add-zero-tests.ts @@ -1,3 +1,3 @@ -import addZero from "add-zero"; +import addZero = require("add-zero"); addZero(5, 2); diff --git a/types/add-zero/index.d.ts b/types/add-zero/index.d.ts index 907364a62d..15c21d4d11 100644 --- a/types/add-zero/index.d.ts +++ b/types/add-zero/index.d.ts @@ -3,4 +3,5 @@ // Definitions by: Giles Roadnight // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export default function addZero(value: string | number, digits?: number): string; +export = addZero; +declare function addZero(value: string | number, digits?: number): string; diff --git a/types/atob/atob-tests.ts b/types/atob/atob-tests.ts index e2e2618387..e9ec4589a5 100644 --- a/types/atob/atob-tests.ts +++ b/types/atob/atob-tests.ts @@ -1,3 +1,3 @@ -import atob from 'atob'; +import atob = require('atob'); atob('foo'); diff --git a/types/atob/index.d.ts b/types/atob/index.d.ts index 1feb3481e8..0da09c74b5 100644 --- a/types/atob/index.d.ts +++ b/types/atob/index.d.ts @@ -4,4 +4,5 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 -export default function(str: string): string; +export = _default; +declare function _default(str: string): string; diff --git a/types/buble/index.d.ts b/types/buble/index.d.ts index db3cb0a7b7..5ac6a96ac6 100644 --- a/types/buble/index.d.ts +++ b/types/buble/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for buble 0.19 -// Project: https://github.com/Rich-Harris/buble#README +// Project: https://github.com/bublejs/buble // Definitions by: Hugo Alliaume // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 diff --git a/types/clamp-js-main/clamp-js-main-tests.ts b/types/clamp-js-main/clamp-js-main-tests.ts index f903b82a06..c85eaed664 100644 --- a/types/clamp-js-main/clamp-js-main-tests.ts +++ b/types/clamp-js-main/clamp-js-main-tests.ts @@ -1,4 +1,5 @@ -import clamp, { ClampOptions, ClampResponse } from 'clamp-js-main'; +import clamp = require('clamp-js-main'); +import { ClampOptions, ClampResponse } from 'clamp-js-main'; const element: HTMLElement = document.createElement('div'); element.style.setProperty('width', '5px'); diff --git a/types/clamp-js-main/index.d.ts b/types/clamp-js-main/index.d.ts index 75286172cb..80cf322896 100644 --- a/types/clamp-js-main/index.d.ts +++ b/types/clamp-js-main/index.d.ts @@ -3,18 +3,21 @@ // Definitions by: Sinziana Nicolae // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export interface ClampOptions { - clamp?: number|string; - useNativeClamp?: boolean; - splitOnChars?: string[]; - animate?: boolean; - truncationChar?: string; - truncationHTML?: string | null; +declare namespace clamp { + interface ClampOptions { + clamp?: number|string; + useNativeClamp?: boolean; + splitOnChars?: string[]; + animate?: boolean; + truncationChar?: string; + truncationHTML?: string | null; + } + + interface ClampResponse { + original: string; + clamped: string; + } } -export interface ClampResponse { - original: string; - clamped: string; -} - -export default function clamp(element: HTMLElement, options?: ClampOptions): ClampResponse; +export = clamp; +declare function clamp(element: HTMLElement, options?: clamp.ClampOptions): clamp.ClampResponse; diff --git a/types/crpc/crpc-tests.ts b/types/crpc/crpc-tests.ts index ade069cbba..b9b59ba718 100644 --- a/types/crpc/crpc-tests.ts +++ b/types/crpc/crpc-tests.ts @@ -1,3 +1,3 @@ -import crpc from 'crpc'; +import crpc = require('crpc'); const client = crpc('https://example.com/'); diff --git a/types/crpc/index.d.ts b/types/crpc/index.d.ts index 8947443c42..a599dacab5 100644 --- a/types/crpc/index.d.ts +++ b/types/crpc/index.d.ts @@ -4,6 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 -export type Client = (path: string, body: any, options?: {} | null) => Promise; +declare namespace crpc { + type Client = (path: string, body: any, options?: {} | null) => Promise; +} -export default function crpc(baseUrl: string, options?: {}): Client; +export = crpc; +declare function crpc(baseUrl: string, options?: {}): crpc.Client; diff --git a/types/dlv/dlv-tests.ts b/types/dlv/dlv-tests.ts index abe4b259c3..64f7c54898 100644 --- a/types/dlv/dlv-tests.ts +++ b/types/dlv/dlv-tests.ts @@ -1,4 +1,4 @@ -import dlv from 'dlv'; +import dlv = require('dlv'); const obj = { undef: undefined, diff --git a/types/dlv/index.d.ts b/types/dlv/index.d.ts index 5813ec0595..093f905259 100644 --- a/types/dlv/index.d.ts +++ b/types/dlv/index.d.ts @@ -9,4 +9,5 @@ * return a default if the full key path does not exist or the value is * undefined */ -export default function dlv(object: object, key: string | string[], defaultValue?: any): any; +export = dlv; +declare function dlv(object: object, key: string | string[], defaultValue?: any): any; diff --git a/types/flushable/flushable-tests.ts b/types/flushable/flushable-tests.ts index 3d4bf565dc..7621810a38 100644 --- a/types/flushable/flushable-tests.ts +++ b/types/flushable/flushable-tests.ts @@ -3,7 +3,7 @@ * from the package's README */ -import flushable from 'flushable'; +import flushable = require('flushable'); // prints a message to the console after 1 second const operation = flushable(flushed => { diff --git a/types/flushable/index.d.ts b/types/flushable/index.d.ts index eb3a08a214..7592cf2ecf 100644 --- a/types/flushable/index.d.ts +++ b/types/flushable/index.d.ts @@ -14,7 +14,8 @@ export interface FlushableOperation { flush: () => void; } -export default function flushable( +export = flushable; +declare function flushable( onComplete: FlushableOnCompleteHandler, delay: number ): FlushableOperation; diff --git a/types/htmlbars-inline-precompile/htmlbars-inline-precompile-tests.ts b/types/htmlbars-inline-precompile/htmlbars-inline-precompile-tests.ts index c8adb26d1a..30bdfed7e4 100644 --- a/types/htmlbars-inline-precompile/htmlbars-inline-precompile-tests.ts +++ b/types/htmlbars-inline-precompile/htmlbars-inline-precompile-tests.ts @@ -1,4 +1,4 @@ -import hbs from 'htmlbars-inline-precompile'; +import hbs = require('htmlbars-inline-precompile'); const likeThisDotRender = (s: string | string[]) => {}; diff --git a/types/htmlbars-inline-precompile/index.d.ts b/types/htmlbars-inline-precompile/index.d.ts index 3cc8e36066..7c5ce2d84d 100644 --- a/types/htmlbars-inline-precompile/index.d.ts +++ b/types/htmlbars-inline-precompile/index.d.ts @@ -13,4 +13,5 @@ // [Babel plugin]: https://github.com/ember-cli/babel-plugin-htmlbars-inline-precompile#babel-plugin-htmlbars-inline-precompile- // [output]: https://github.com/emberjs/ember-test-helpers/blob/77f9a53da9d8c19a85b3122788caadbcc59274c2/lib/ember-test-helpers/-legacy-overrides.js#L17-L42 -export default function hbs(tagged: TemplateStringsArray): string | string[]; +export = hbs; +declare function hbs(tagged: TemplateStringsArray): string | string[];