Remove incorrect 'export default', part 1

This commit is contained in:
Nathan Shively-Sanders 2019-03-12 09:35:43 -07:00
parent e95a4f0f1f
commit 616a95fe99
15 changed files with 40 additions and 28 deletions

View File

@ -1,3 +1,3 @@
import addZero from "add-zero";
import addZero = require("add-zero");
addZero(5, 2);

View File

@ -3,4 +3,5 @@
// Definitions by: Giles Roadnight <https://github.com/Roaders>
// 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;

View File

@ -1,3 +1,3 @@
import atob from 'atob';
import atob = require('atob');
atob('foo');

View File

@ -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;

View File

@ -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 <https://github.com/Kocal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1

View File

@ -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');

View File

@ -3,18 +3,21 @@
// Definitions by: Sinziana Nicolae <https://github.com/sinziananicolae>
// 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;

View File

@ -1,3 +1,3 @@
import crpc from 'crpc';
import crpc = require('crpc');
const client = crpc('https://example.com/');

View File

@ -4,6 +4,9 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
export type Client = <TRes>(path: string, body: any, options?: {} | null) => Promise<TRes>;
declare namespace crpc {
type Client = <TRes>(path: string, body: any, options?: {} | null) => Promise<TRes>;
}
export default function crpc(baseUrl: string, options?: {}): Client;
export = crpc;
declare function crpc(baseUrl: string, options?: {}): crpc.Client;

View File

@ -1,4 +1,4 @@
import dlv from 'dlv';
import dlv = require('dlv');
const obj = {
undef: undefined,

View File

@ -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;

View File

@ -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 => {

View File

@ -14,7 +14,8 @@ export interface FlushableOperation {
flush: () => void;
}
export default function flushable(
export = flushable;
declare function flushable(
onComplete: FlushableOnCompleteHandler,
delay: number
): FlushableOperation;

View File

@ -1,4 +1,4 @@
import hbs from 'htmlbars-inline-precompile';
import hbs = require('htmlbars-inline-precompile');
const likeThisDotRender = (s: string | string[]) => {};

View File

@ -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[];