Merge pull request #33813 from DefinitelyTyped/fix-bogus-export-default-pt-1

Remove incorrect 'export default'
This commit is contained in:
Nathan Shively-Sanders
2019-03-12 10:08:45 -07:00
committed by GitHub
13 changed files with 49 additions and 36 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
import addZero from "add-zero";
import addZero = require("add-zero");
addZero(5, 2);
+2 -1
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;
+1 -1
View File
@@ -1,3 +1,3 @@
import atob from 'atob';
import atob = require('atob');
atob('foo');
+2 -1
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;
+1 -1
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
+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');
+16 -13
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;
+1 -1
View File
@@ -1,3 +1,3 @@
import crpc from 'crpc';
import crpc = require('crpc');
const client = crpc('https://example.com/');
+5 -2
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;
+1 -1
View File
@@ -1,4 +1,4 @@
import dlv from 'dlv';
import dlv = require('dlv');
const obj = {
undef: undefined,
+2 -1
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;
+1 -1
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 => {
+14 -11
View File
@@ -3,18 +3,21 @@
// Definitions by: Parth Mehta <https://github.com/pash90>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type FlushableOnCompleteHandler = (flushed: boolean) => any;
declare namespace flushable {
type FlushableOnCompleteHandler = (flushed: boolean) => any;
export interface FlushableOperation {
/** Returns whether or not the callback has been executed */
pending: () => boolean;
/** Stops the callback from being executed */
cancel: () => void;
/** Immediately executes the callback */
flush: () => void;
interface FlushableOperation {
/** Returns whether or not the callback has been executed */
pending: () => boolean;
/** Stops the callback from being executed */
cancel: () => void;
/** Immediately executes the callback */
flush: () => void;
}
}
export default function flushable(
onComplete: FlushableOnCompleteHandler,
export = flushable;
declare function flushable(
onComplete: flushable.FlushableOnCompleteHandler,
delay: number
): FlushableOperation;
): flushable.FlushableOperation;