mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Use export = syntax
This commit is contained in:
Vendored
+12
-8
@@ -3,22 +3,26 @@
|
||||
// Definitions by: Javon Harper <https://github.com/javonharper>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface LibraryConfig {
|
||||
interface LibraryConfig {
|
||||
debug?: boolean;
|
||||
token?: string;
|
||||
networkTimeout?: number;
|
||||
timeoutWindow?: number;
|
||||
}
|
||||
|
||||
export type FunctionWrapper = (handler: any) => void;
|
||||
type FunctionWrapper = (handler: any) => void;
|
||||
|
||||
export function label(label: string): void;
|
||||
declare function iopipe(config?: LibraryConfig): FunctionWrapper;
|
||||
|
||||
export function metric(label: string, value: number): void;
|
||||
declare namespace iopipe {
|
||||
function label(label: string): void;
|
||||
|
||||
export namespace mark {
|
||||
function start(label: string): void;
|
||||
function end(label: string): void;
|
||||
function metric(label: string, value: number): void;
|
||||
|
||||
namespace mark {
|
||||
function start(label: string): void;
|
||||
function end(label: string): void;
|
||||
}
|
||||
}
|
||||
|
||||
export default function iopipe(config?: LibraryConfig): FunctionWrapper;
|
||||
export = iopipe;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import iopipe, { label, metric, mark, LibraryConfig } from "iopipe__iopipe";
|
||||
import iopipe, { label, metric, mark } from "iopipe__iopipe";
|
||||
|
||||
const config: LibraryConfig = {
|
||||
const config = {
|
||||
token: "ABCDEFG"
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user