diff --git a/types/bootstrap.v3.datetimepicker/index.d.ts b/types/bootstrap.v3.datetimepicker/index.d.ts index 7b54c57dae..4686aa9680 100644 --- a/types/bootstrap.v3.datetimepicker/index.d.ts +++ b/types/bootstrap.v3.datetimepicker/index.d.ts @@ -16,7 +16,7 @@ import * as moment from "moment"; export as namespace BootstrapV3DatetimePicker; -type InputParser = (input: string | Date | moment.Moment) => moment.Moment; +export type InputParser = (input: string | Date | moment.Moment) => moment.Moment; export interface Datetimepicker { /** Clears the datepicker by setting the value to null */ @@ -576,7 +576,7 @@ export interface UpdateEvent extends JQueryEventObject { viewDate: moment.Moment; } -type EventName = "dp.show" | "dp.hide" | "dp.error"; +export type EventName = "dp.show" | "dp.hide" | "dp.error"; declare global { interface JQuery { diff --git a/types/code/index.d.ts b/types/code/index.d.ts index a17f844d3a..7541831db2 100644 --- a/types/code/index.d.ts +++ b/types/code/index.d.ts @@ -16,13 +16,13 @@ export function thrownAt(error?: Error): CodeError; /** Configure code. */ export const settings: Settings; -type AssertionChain = Assertion & Expectation; +export type AssertionChain = Assertion & Expectation; -type Assertion = Grammar & Flags; +export type Assertion = Grammar & Flags; -type Expectation = Types & Values; +export type Expectation = Types & Values; -interface Grammar { +export interface Grammar { /** Connecting word. */ a: AssertionChain; /** Connecting word. */ @@ -41,7 +41,7 @@ interface Grammar { to: AssertionChain; } -interface Flags { +export interface Flags { /** Inverses the expected result of any assertion */ not: AssertionChain; /** @@ -66,7 +66,7 @@ interface Flags { shallow: AssertionChain; } -interface Types { +export interface Types { /** Asserts that the reference value is an arguments object. */ arguments(): AssertionChain; /** Asserts that the reference value is an Array. */ @@ -91,7 +91,7 @@ interface Types { object(): AssertionChain; } -interface Values { +export interface Values { /** Asserts that the reference value is true. */ true(): AssertionChain; /** Asserts that the reference value is false. */ @@ -170,7 +170,7 @@ interface Values { throws(type?: any, message?: string | RegExp): AssertionChain; } -interface Settings { +export interface Settings { /** * Truncate long assertion error messages for readability? * Defaults to true. @@ -183,7 +183,7 @@ interface Settings { comparePrototypes?: boolean; } -interface CodeError { +export interface CodeError { filename: string; line: string; column: string; diff --git a/types/codependency/index.d.ts b/types/codependency/index.d.ts index c533a52e8e..5b24f97079 100644 --- a/types/codependency/index.d.ts +++ b/types/codependency/index.d.ts @@ -7,7 +7,7 @@ export as namespace codependency; -interface DependencyInfo { +export interface DependencyInfo { supportedRange: string|null; installedVersion: string|null; isInstalled: boolean|null; @@ -15,12 +15,12 @@ interface DependencyInfo { pkgPath: string; } -interface RequirePeerFunctionOptions { +export interface RequirePeerFunctionOptions { optional?: boolean; dontThrow?: boolean; } -interface RequirePeerFunction { +export interface RequirePeerFunction { (name: string, options?: RequirePeerFunctionOptions): any; resolve(name: string): DependencyInfo; } diff --git a/types/colors/index.d.ts b/types/colors/index.d.ts index 68d6fe593e..a5494aa945 100644 --- a/types/colors/index.d.ts +++ b/types/colors/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Bart van der Schoor , Staffan Eketorp // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface Color { +export interface Color { (text: string): string; strip: Color; diff --git a/types/connect-ensure-login/index.d.ts b/types/connect-ensure-login/index.d.ts index bbf827922c..9158255c40 100644 --- a/types/connect-ensure-login/index.d.ts +++ b/types/connect-ensure-login/index.d.ts @@ -5,7 +5,7 @@ import { RequestHandler } from "express"; -interface LoggedInOptions { +export interface LoggedInOptions { /** * URL to redirect to for login, defaults to _/login_ */ @@ -15,7 +15,7 @@ interface LoggedInOptions { */ setRedirectTo?: boolean; } -interface LoggedOutOptions { +export interface LoggedOutOptions { /** * URL to redirect to in logged in, defaults to _/_ */ diff --git a/types/d3-array/index.d.ts b/types/d3-array/index.d.ts index 8f5d4eab2e..74ecbb0e36 100644 --- a/types/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -17,7 +17,7 @@ export type Primitive = number | string | boolean | Date; /** * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations */ -interface Numeric { +export interface Numeric { valueOf(): number; } diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index 34196f755e..ef164164cf 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -159,7 +159,7 @@ export function selectAll(nodes: ArrayLike< * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection. * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). */ -interface Selection { +export interface Selection { // Sub-selection ------------------------- /** @@ -852,7 +852,7 @@ interface Selection Selection; +export type SelectionFn = () => Selection; /** * Selects the root element, document.documentElement. This function can also be used to test for selections @@ -867,7 +867,7 @@ export const selection: SelectionFn; /** * A D3 Base Event */ -interface BaseEvent { +export interface BaseEvent { /** * Event type */ diff --git a/types/d3-zoom/index.d.ts b/types/d3-zoom/index.d.ts index 904f7b8e62..62c49b977b 100644 --- a/types/d3-zoom/index.d.ts +++ b/types/d3-zoom/index.d.ts @@ -17,7 +17,7 @@ import { ZoomView, ZoomInterpolator } from 'd3-interpolate'; * without 'd3-zoom' (and related code in 'd3-selection') trying to use properties internally which would otherwise not * be supported. */ -type ZoomedElementBaseType = Element; +export type ZoomedElementBaseType = Element; /** * Minimal interface for a continuous scale. diff --git a/types/dagre-d3/index.d.ts b/types/dagre-d3/index.d.ts index 480ca6b402..9a14ecbae4 100644 --- a/types/dagre-d3/index.d.ts +++ b/types/dagre-d3/index.d.ts @@ -27,7 +27,7 @@ declare module "dagre" { } } -interface Render { +export interface Render { // see http://cpettitt.github.io/project/dagre-d3/latest/demo/user-defined.html for example usage arrows(): { [arrowStyleName: string]: (parent: d3.Selection, id: string, edge: dagre.Edge, type: string) => void }; (selection: d3.Selection, g: dagre.graphlib.Graph): void; diff --git a/types/dagre/index.d.ts b/types/dagre/index.d.ts index 96484e296f..7408d145cf 100644 --- a/types/dagre/index.d.ts +++ b/types/dagre/index.d.ts @@ -20,7 +20,7 @@ export namespace graphlib { export function layout(graph: graphlib.Graph): void; -interface Edge { +export interface Edge { v: string; w: string; } diff --git a/types/dookie/index.d.ts b/types/dookie/index.d.ts index bd3f6ea06b..3a59c8fe84 100644 --- a/types/dookie/index.d.ts +++ b/types/dookie/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Swanest // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface PushOpts { +export interface PushOpts { filename?: string; dropDatabase: boolean; } diff --git a/types/dot/index.d.ts b/types/dot/index.d.ts index 893b611d6c..9ecd61b7ab 100644 --- a/types/dot/index.d.ts +++ b/types/dot/index.d.ts @@ -11,7 +11,7 @@ export const version: string; /** Default template settings */ export const templateSettings: TemplateSettings; -type RenderFunction = (...args: any[]) => string; +export type RenderFunction = (...args: any[]) => string; /** Compile template */ export function template(tmpl: string, c?: TemplateSettings, def?: {}): RenderFunction; @@ -19,7 +19,7 @@ export function template(tmpl: string, c?: TemplateSettings, def?: {}): RenderFu /** For express */ export function compile(tmpl: string, def?: {}): RenderFunction; -interface TemplateSettings { +export interface TemplateSettings { evaluate: RegExp; interpolate: RegExp; encode: RegExp; diff --git a/types/ej.web.all/tslint.json b/types/ej.web.all/tslint.json index f85abff699..0b41224bc0 100644 --- a/types/ej.web.all/tslint.json +++ b/types/ej.web.all/tslint.json @@ -1,4 +1,13 @@ { +<<<<<<< HEAD + "extends": "../tslint.json", + "rules": { + "comment-format": false, + "no-consecutive-blank-lines": false, + "no-padding": false, + "strict-export-declare-modifiers": false + } +======= "extends": "dtslint/dt.json", "rules": { "comment-format": false, @@ -6,4 +15,5 @@ "no-padding": false, "strict-export-declare-modifiers": false } +>>>>>>> master } diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 4155cd1218..abd40975be 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -12,7 +12,7 @@ /// import { ReactElement, Component, HTMLAttributes as ReactHTMLAttributes, SVGAttributes as ReactSVGAttributes } from "react"; -type HTMLAttributes = ReactHTMLAttributes<{}> & ReactSVGAttributes<{}>; +export type HTMLAttributes = ReactHTMLAttributes<{}> & ReactSVGAttributes<{}>; export class ElementClass extends Component { } @@ -21,11 +21,11 @@ export class ElementClass extends Component { * The optional static properties on them break overload ordering for wrapper methods if they're not * all specified in the implementation. TS chooses the EnzymePropSelector overload and loses the generics */ -interface ComponentClass { +export interface ComponentClass { new(props?: Props, context?: any): Component; } -type StatelessComponent = (props: Props, context?: any) => JSX.Element; +export type StatelessComponent = (props: Props, context?: any) => JSX.Element; /** * Many methods in Enzyme's API accept a selector as an argument. Selectors in Enzyme can fall into one of the @@ -42,7 +42,7 @@ export interface EnzymePropSelector { } export type EnzymeSelector = string | StatelessComponent | ComponentClass | EnzymePropSelector; -interface CommonWrapper { +export interface CommonWrapper { /** * Returns a new wrapper with only the nodes of the current wrapper that, when passed into the provided predicate function, return true. * @param predicate diff --git a/types/expr-eval/index.d.ts b/types/expr-eval/index.d.ts index cab8333186..8fc4c1438a 100644 --- a/types/expr-eval/index.d.ts +++ b/types/expr-eval/index.d.ts @@ -3,12 +3,12 @@ // Definitions by: Connor Peet // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type Value = number +export type Value = number | string | ((...args: Value[]) => Value) | { [propertyName: string]: Value }; -interface Values { +export interface Values { [propertyName: string]: Value; } diff --git a/types/fabric/tslint.json b/types/fabric/tslint.json index 02e86cc56a..73c89a8576 100644 --- a/types/fabric/tslint.json +++ b/types/fabric/tslint.json @@ -5,6 +5,7 @@ "ban-types": false, "interface-name": false, "no-empty-interface": false, + "strict-export-declare-modifiers": false, "unified-signatures": false } } diff --git a/types/falcor/index.d.ts b/types/falcor/index.d.ts index f5cea280a0..463683f40f 100644 --- a/types/falcor/index.d.ts +++ b/types/falcor/index.d.ts @@ -61,7 +61,7 @@ export abstract class DataSource { // Model ///////////////////////////////////////////////////// -interface ModelOptions { +export interface ModelOptions { source?: DataSource; cache?: JSONGraph; maxSize?: number; @@ -74,18 +74,18 @@ interface ModelOptions { /** * This callback is invoked when the Model's cache is changed. */ -type ModelOnChange = () => void; +export type ModelOnChange = () => void; /** * This function is invoked on every JSONGraph Error retrieved from the DataSource. This function allows Error objects to be transformed before being stored in the Model's cache. */ -type ModelErrorSelector = (jsonGraphError: any) => any; +export type ModelErrorSelector = (jsonGraphError: any) => any; /** * This function is invoked every time a value in the Model cache is about to be replaced with a new value. * If the function returns true, the existing value is replaced with a new value and the version flag on all of the value's ancestors in the tree are incremented. */ -type ModelComparator = (existingValue: any, newValue: any) => boolean; +export type ModelComparator = (existingValue: any, newValue: any) => boolean; /** * A Model object is used to execute commands against a {@link JSONGraph} object @@ -223,7 +223,7 @@ export class ModelResponse extends Observable { then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => void): Thenable; } -interface Thenable { +export interface Thenable { then(onFulfilled?: (value: T) => U | Thenable, onRejected?: (error: any) => U | Thenable | void): Thenable; } @@ -251,19 +251,19 @@ export class Observable{ /** * This callback accepts a value that was emitted while evaluating the operation underlying the {@link Observable} stream. */ -type ObservableOnNextCallback = (value: T) => void; +export type ObservableOnNextCallback = (value: T) => void; /** * This callback accepts an error that occurred while evaluating the operation underlying the {@link Observable} stream. * When this callback is invoked, the {@link Observable} stream ends and no more values will be received by the {@link Observable~onNextCallback}. */ -type ObservableOnErrorCallback = (error: Error) => void; +export type ObservableOnErrorCallback = (error: Error) => void; /** * This callback is invoked when the {@link Observable} stream ends. * When this callback is invoked the {@link Observable} stream has ended, and therefore the {@link Observable~onNextCallback} will not receive any more values. */ -type ObservableOnCompletedCallback = () => void; +export type ObservableOnCompletedCallback = () => void; export class Subscription { /** @@ -272,7 +272,7 @@ export class Subscription { dispose(): void; } -interface Scheduler { +export interface Scheduler { catch(handler: (exception: any) => boolean): Scheduler; catchException(handler: (exception: any) => boolean): Scheduler; } diff --git a/types/fetch.io/index.d.ts b/types/fetch.io/index.d.ts index 2071e18a51..ab949d4880 100644 --- a/types/fetch.io/index.d.ts +++ b/types/fetch.io/index.d.ts @@ -4,19 +4,19 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -type TUrl = string; +export type TUrl = string; -type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; +export type TMethod = 'delete' | 'get' | 'head' | 'options' | 'post' | 'put'; -interface Query { +export interface Query { [key: string]: number | boolean | string; } -interface Header { +export interface Header { [key: string]: string; } -interface Options extends RequestInit { +export interface Options extends RequestInit { prefix?: string; query?: Query; diff --git a/types/fs-promise/index.d.ts b/types/fs-promise/index.d.ts index 6455018e5c..dee8041d5a 100644 --- a/types/fs-promise/index.d.ts +++ b/types/fs-promise/index.d.ts @@ -13,11 +13,11 @@ export interface WriteOptions { flag?: string; } -type JsonReplacerArray = Array; +export type JsonReplacerArray = Array; -type JsonReplacerFunction = (key: string, value: any) => any; +export type JsonReplacerFunction = (key: string, value: any) => any; -type JsonReplacer = JsonReplacerArray | JsonReplacerFunction; +export type JsonReplacer = JsonReplacerArray | JsonReplacerFunction; export interface WriteJsonOptions extends WriteOptions { spaces?: number; diff --git a/types/geojson/index.d.ts b/types/geojson/index.d.ts index 902b367d52..9902b974cd 100644 --- a/types/geojson/index.d.ts +++ b/types/geojson/index.d.ts @@ -22,7 +22,7 @@ export type Position = number[]; /*** * http://geojson.org/geojson-spec.html#geometry-objects */ -interface DirectGeometryObject extends GeoJsonObject { +export interface DirectGeometryObject extends GeoJsonObject { coordinates: Position[][][] | Position[][] | Position[] | Position; } /** diff --git a/types/graphite-udp/index.d.ts b/types/graphite-udp/index.d.ts index b3e843b0d4..30b5bdb1f5 100644 --- a/types/graphite-udp/index.d.ts +++ b/types/graphite-udp/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Eric Byers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface ClientOptions { +export interface ClientOptions { /** * graphite server host or ip * Defaults to 127.0.0.1 diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index ce6ba8a7e2..7c0d9965a8 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -29,7 +29,7 @@ import { * Returns a GraphQLFieldConfigArgumentMap appropriate to include on a field * whose return type is a connection type with forward pagination. */ -interface ForwardConnectionArgs { +export interface ForwardConnectionArgs { after: ConnectionCursor; first: number; } @@ -42,7 +42,7 @@ export const forwardConnectionArgs: GraphQLFieldConfigArgumentMap & { * Returns a GraphQLFieldConfigArgumentMap appropriate to include on a field * whose return type is a connection type with backward pagination. */ -interface BackwardConnectionArgs { +export interface BackwardConnectionArgs { before: ConnectionCursor; last: number; } @@ -57,7 +57,7 @@ export const backwardConnectionArgs: GraphQLFieldConfigArgumentMap & { */ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionArgs & BackwardConnectionArgs; -interface ConnectionConfig { +export interface ConnectionConfig { name?: string | null; nodeType: GraphQLObjectType; resolveNode?: GraphQLFieldResolver | null; @@ -66,7 +66,7 @@ interface ConnectionConfig { connectionFields?: Thunk> | null; } -interface GraphQLConnectionDefinitions { +export interface GraphQLConnectionDefinitions { edgeType: GraphQLObjectType; connectionType: GraphQLObjectType; } @@ -107,7 +107,7 @@ export interface Connection { /** * A flow type designed to be exposed as a `Edge` over GraphQL. */ -interface Edge { +export interface Edge { node: T; cursor: ConnectionCursor; } @@ -115,7 +115,7 @@ interface Edge { /** * A flow type describing the arguments a connection field receives in GraphQL. */ -interface ConnectionArguments { +export interface ConnectionArguments { before?: ConnectionCursor; after?: ConnectionCursor; first?: number; @@ -124,7 +124,7 @@ interface ConnectionArguments { // connection/arrayconnection.js -interface ArraySliceMetaInfo { +export interface ArraySliceMetaInfo { sliceStart: number; arrayLength: number; } @@ -203,7 +203,7 @@ export function getOffsetWithDefault( // mutation/mutation.js -type mutationFn = ( +export type mutationFn = ( object: any, ctx: any, info: GraphQLResolveInfo @@ -223,7 +223,7 @@ type mutationFn = ( * input field, and it should return an Object with a key for each * output field. It may return synchronously, or return a Promise. */ -interface MutationConfig { +export interface MutationConfig { name: string; description?: string; inputFields: Thunk; @@ -241,12 +241,12 @@ export function mutationWithClientMutationId( // node/node.js -interface GraphQLNodeDefinitions { +export interface GraphQLNodeDefinitions { nodeInterface: GraphQLInterfaceType; nodeField: GraphQLFieldConfig; } -type typeResolverFn = ((any: any) => GraphQLObjectType) | +export type typeResolverFn = ((any: any) => GraphQLObjectType) | ((any: any) => Promise); /** @@ -264,7 +264,7 @@ export function nodeDefinitions( typeResolver?: GraphQLTypeResolver ): GraphQLNodeDefinitions; -interface ResolvedGlobalId { +export interface ResolvedGlobalId { type: string; id: string; } @@ -294,7 +294,7 @@ export function globalIdField( // node/plural.js -interface PluralIdentifyingRootFieldConfig { +export interface PluralIdentifyingRootFieldConfig { argName: string; inputType: GraphQLInputType; outputType: GraphQLOutputType; diff --git a/types/halogen/index.d.ts b/types/halogen/index.d.ts index 5735737f41..35337e7e9f 100644 --- a/types/halogen/index.d.ts +++ b/types/halogen/index.d.ts @@ -6,9 +6,9 @@ import * as react from "react"; -type VerticalAlign = "baseline" | "length" | "sub" | "super" | "top" | "text-top" | "middle" | "bottom" | "text-bottom" | "initial" | "inherit"; +export type VerticalAlign = "baseline" | "length" | "sub" | "super" | "top" | "text-top" | "middle" | "bottom" | "text-bottom" | "initial" | "inherit"; -interface HalogenCommonProps { +export interface HalogenCommonProps { loading?: boolean; color?: string; id?: string; @@ -16,16 +16,16 @@ interface HalogenCommonProps { verticalAlign?: VerticalAlign; } -interface SizeLoaderProps extends HalogenCommonProps { +export interface SizeLoaderProps extends HalogenCommonProps { size?: string; } -interface MarginLoaderProps extends HalogenCommonProps { +export interface MarginLoaderProps extends HalogenCommonProps { margin?: T; size?: T; } -interface RadiusLoaderProps extends MarginLoaderProps { +export interface RadiusLoaderProps extends MarginLoaderProps { height?: string; width?: string; radius?: string; @@ -34,50 +34,50 @@ interface RadiusLoaderProps extends MarginLoaderProps { /** * React components */ -type PulseLoader = react.Component, {}>; +export type PulseLoader = react.Component, {}>; export const PulseLoader: react.ComponentClass>; -type RotateLoader = react.Component, {}>; +export type RotateLoader = react.Component, {}>; export const RotateLoader: react.ComponentClass>; -type BeatLoader = react.Component, {}>; +export type BeatLoader = react.Component, {}>; export const BeatLoader: react.ComponentClass>; -type RiseLoader = react.Component, {}>; +export type RiseLoader = react.Component, {}>; export const RiseLoader: react.ComponentClass>; -type SyncLoader = react.Component, {}>; +export type SyncLoader = react.Component, {}>; export const SyncLoader: react.ComponentClass>; -type GridLoader = react.Component, {}>; +export type GridLoader = react.Component, {}>; export const GridLoader: react.ComponentClass>; -type ClipLoader = react.Component; +export type ClipLoader = react.Component; export const ClipLoader: react.ComponentClass; -type SquareLoader = react.Component; +export type SquareLoader = react.Component; export const SquareLoader: react.ComponentClass; -type DotLoader = react.Component; +export type DotLoader = react.Component; export const DotLoader: react.ComponentClass; -type PacmanLoader = react.Component, {}>; +export type PacmanLoader = react.Component, {}>; export const PacmanLoader: react.ComponentClass>; -type MoonLoader = react.Component; +export type MoonLoader = react.Component; export const MoonLoader: react.ComponentClass; -type RingLoader = react.Component; +export type RingLoader = react.Component; export const RingLoader: react.ComponentClass; -type BounceLoader = react.Component; +export type BounceLoader = react.Component; export const BounceLoader: react.ComponentClass; -type SkewLoader = react.Component; +export type SkewLoader = react.Component; export const SkewLoader: react.ComponentClass; -type FadeLoader = react.Component; +export type FadeLoader = react.Component; export const FadeLoader: react.ComponentClass; -type ScaleLoader = react.Component; +export type ScaleLoader = react.Component; export const ScaleLoader: react.ComponentClass; diff --git a/types/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts index 055cbd9ce7..c12a1f8c04 100644 --- a/types/hapi-auth-jwt2/index.d.ts +++ b/types/hapi-auth-jwt2/index.d.ts @@ -10,7 +10,7 @@ import {Request, Response} from 'hapi'; * @param decoded the *decoded* but *unverified* JWT received from client * @param callback the key lookup callback */ -type KeyLookup = (decoded: any, callback: KeyLookupCallback) => void; +export type KeyLookup = (decoded: any, callback: KeyLookupCallback) => void; /** * Called when key lookup function has completed @@ -21,7 +21,7 @@ type KeyLookup = (decoded: any, callback: KeyLookupCallback) => void; * to use in `validateFunc` which can be accessed via * `request.plugins['hapi-auth-jwt2'].extraInfo` */ -type KeyLookupCallback = (err: any, key: string, extraInfo?: any) => void; +export type KeyLookupCallback = (err: any, key: string, extraInfo?: any) => void; /** * Called when Validation has completed @@ -30,7 +30,7 @@ type KeyLookupCallback = (err: any, key: string, extraInfo?: any) => void; * @param valid `true` if the JWT was valid, otherwise `false` * @param credentials alternative credentials to be set instead of `decoded` */ -type ValidateCallback = (err: any, valid: boolean, credentials?: any) => void; +export type ValidateCallback = (err: any, valid: boolean, credentials?: any) => void; /** * Options passed to `hapi.auth.strategy` when this plugin is used diff --git a/types/hoek/index.d.ts b/types/hoek/index.d.ts index dfc7aa58ae..7d0b78175f 100644 --- a/types/hoek/index.d.ts +++ b/types/hoek/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Prashant Tiwari // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface ContainOptions { +export interface ContainOptions { /** Perform a deep comparison of the values? */ deep?: boolean; /** Allow only one occurrence of each value? */ @@ -14,7 +14,7 @@ interface ContainOptions { part?: boolean; } -interface ReachOptions { +export interface ReachOptions { /** String to split chain path on. Defaults to ".". */ separator?: string; /** Value to return if the path or value is not present. Default is undefined. */ diff --git a/types/isbn-utils/index.d.ts b/types/isbn-utils/index.d.ts index f0e1fe5515..c6f8aa908f 100644 --- a/types/isbn-utils/index.d.ts +++ b/types/isbn-utils/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jørgen Elgaard Larsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type IGroups = any; +export type IGroups = any; export class ISBNcodes { readonly source: string; diff --git a/types/jui-core/index.d.ts b/types/jui-core/index.d.ts index d932198d17..2bea574d7c 100644 --- a/types/jui-core/index.d.ts +++ b/types/jui-core/index.d.ts @@ -7,7 +7,7 @@ export const jui: JuiStatic; -interface UtilBase { +export interface UtilBase { /** * @property browser check browser agent * @property {Boolean} browser.webkit Webkit 브라우저 체크 @@ -329,7 +329,7 @@ interface UtilBase { scrollWidth(): number; } -interface JuiStatic { +export interface JuiStatic { /** * @method ready * @@ -436,11 +436,11 @@ interface JuiStatic { create(type: string, selector: any, options?: {}): any; } -interface UICollection { +export interface UICollection { destroy(): void; } -interface UICore { +export interface UICore { tpl?: any; event?: any; @@ -673,12 +673,12 @@ export interface UtilColor { darken(color: string, rate: number): string; } -interface UtilBase64 { +export interface UtilBase64 { encode(input: string): string; decode(input: string): string; } -interface UtilKeyParser { +export interface UtilKeyParser { /** * @method isIndexDepth * @@ -724,7 +724,7 @@ interface UtilKeyParser { getParentIndex(index: string): string; } -interface UtilMath { +export interface UtilMath { /** * @method rotate * diff --git a/types/klaw-sync/index.d.ts b/types/klaw-sync/index.d.ts index e68af63739..23eb661174 100644 --- a/types/klaw-sync/index.d.ts +++ b/types/klaw-sync/index.d.ts @@ -7,12 +7,12 @@ import * as fs from "fs" -interface Item { +export interface Item { path: string stats: fs.Stats } -interface Options { +export interface Options { /** * any paths or `micromatch` patterns to ignore. * diff --git a/types/navigation-react/index.d.ts b/types/navigation-react/index.d.ts index 106b14bf43..a4dd084b84 100644 --- a/types/navigation-react/index.d.ts +++ b/types/navigation-react/index.d.ts @@ -10,7 +10,7 @@ import { Component, HTMLProps } from 'react'; /** * Defines the Link Props contract */ -interface LinkProps extends HTMLProps { +export interface LinkProps extends HTMLProps { /** * Indicates whether Links listen for navigate events */ @@ -32,7 +32,7 @@ interface LinkProps extends HTMLProps { /** * Defines the Refresh Link Props contract */ -interface RefreshLinkProps extends LinkProps { +export interface RefreshLinkProps extends LinkProps { /** * The NavigationData to pass */ @@ -63,7 +63,7 @@ export class RefreshLink extends Component { } /** * Defines the Navigation Link Props contract */ -interface NavigationLinkProps extends RefreshLinkProps { +export interface NavigationLinkProps extends RefreshLinkProps { /** * The key of the State to navigate to */ @@ -78,7 +78,7 @@ export class NavigationLink extends Component { } /** * Defines the Navigation Back Link Props contract */ -interface NavigationBackLinkProps extends RefreshLinkProps { +export interface NavigationBackLinkProps extends RefreshLinkProps { /** * Starting at 1, The number of Crumb steps to go back */ diff --git a/types/navigation/index.d.ts b/types/navigation/index.d.ts index 0305a3d730..6f05956a8a 100644 --- a/types/navigation/index.d.ts +++ b/types/navigation/index.d.ts @@ -6,7 +6,7 @@ /** * Defines a contract a class must implement in order to configure a State */ -interface StateInfo { +export interface StateInfo { /** * Gets the unique key */ @@ -155,7 +155,7 @@ export class State implements StateInfo { * Defines a contract a class must implement in order to manage the browser * Url */ -interface HistoryManager { +export interface HistoryManager { /** * Gets or sets a value indicating whether to disable browser history */ @@ -396,7 +396,7 @@ export class StateContext { * Fluently manages all navigation. These can be forward, backward or * refreshing the current State */ -interface FluentNavigator { +export interface FluentNavigator { /** * Gets the current Url */ diff --git a/types/node-common-errors/index.d.ts b/types/node-common-errors/index.d.ts index 370428618c..7ee4f0450e 100644 --- a/types/node-common-errors/index.d.ts +++ b/types/node-common-errors/index.d.ts @@ -5,9 +5,9 @@ import * as express from 'express'; -type GenerateMessageMethod = () => string; +export type GenerateMessageMethod = () => string; -interface ErrorConstructor { +export interface ErrorConstructor { new (...params: any[]): Error; } diff --git a/types/node-hid/index.d.ts b/types/node-hid/index.d.ts index 7c04487b37..34afff06b1 100644 --- a/types/node-hid/index.d.ts +++ b/types/node-hid/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Mohamed Hegazy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface Device { +export interface Device { vendorId: number; productId: number; path: string; diff --git a/types/node-waves/index.d.ts b/types/node-waves/index.d.ts index 60114e79e8..b4f3f946ef 100644 --- a/types/node-waves/index.d.ts +++ b/types/node-waves/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type ElementTarget = string | Element | Element[]; +export type ElementTarget = string | Element | Element[]; export interface WavesConfig { /** diff --git a/types/node-xmpp-client/index.d.ts b/types/node-xmpp-client/index.d.ts index 02f8a64e59..0f8db89799 100644 --- a/types/node-xmpp-client/index.d.ts +++ b/types/node-xmpp-client/index.d.ts @@ -18,7 +18,7 @@ export class Client { send(stanza: any): void; } -interface Stanza extends Element { +export interface Stanza extends Element { // This has to be used for the static class initializer new Client.Stanza(..). If there is a better way feel free to // contribute. // tslint:disable-next-line @@ -29,7 +29,7 @@ interface Stanza extends Element { type: string; } -interface Element { +export interface Element { is(name: string, xmlns: string): boolean; getName(): string; getNS(): string; @@ -49,7 +49,7 @@ interface Element { toJSON(): any; } -interface XmppOptions { +export interface XmppOptions { jid: string; password: string; host?: string; @@ -65,7 +65,7 @@ interface XmppOptions { bosh?: Bosh; } -interface Bosh { +export interface Bosh { url?: string; prebind?(error: any, data: any): void; } diff --git a/types/node-zookeeper-client/index.d.ts b/types/node-zookeeper-client/index.d.ts index d88eab9fa5..ae98455d1f 100644 --- a/types/node-zookeeper-client/index.d.ts +++ b/types/node-zookeeper-client/index.d.ts @@ -72,7 +72,7 @@ export class Event { getPath(): string; } -interface Transaction { +export interface Transaction { create(path: string, dataOrAclsOrmode1?: Buffer | ACL[] | number, dataOrAclsOrmode2?: Buffer | ACL[] | number, dataOrAclsOrmode3?: Buffer | ACL[] | number): this; setData(path: string, data: Buffer | null, version?: number): this; check(path: string, version?: number): this; @@ -80,7 +80,7 @@ interface Transaction { commit(callback: (error: Error | Exception, results: any) => void): void; } -interface Client extends EventEmitter { +export interface Client extends EventEmitter { connect(): void; close(): void; create(path: string, callback: (error: Error | Exception, path: string) => void): void; diff --git a/types/pem/index.d.ts b/types/pem/index.d.ts index b65b60b9e1..e8325f5d47 100644 --- a/types/pem/index.d.ts +++ b/types/pem/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Anthony Trinh , Ruslan Arkhipau // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface ModuleConfiguration { +export interface ModuleConfiguration { /** * Path to OpenSSL binaries */ @@ -12,24 +12,24 @@ interface ModuleConfiguration { export type PrivateKeyCipher = "aes128" | "aes192" | "aes256" | "camellia128" | "camellia192" | "camellia256" | "des" | "des3" | "idea" | string; // allow for additions in future -interface PrivateKeyCreationOptions { +export interface PrivateKeyCreationOptions { cipher: PrivateKeyCipher; password: string; } -interface Pkcs12CreationOptions { +export interface Pkcs12CreationOptions { cipher?: PrivateKeyCipher; clientKeyPassword?: string; certFiles?: string[]; } -interface Pkcs12ReadOptions { +export interface Pkcs12ReadOptions { p12Password?: string; clientKeyPassword?: string; } export type HashFunction = 'md5' | 'sha1' | 'sha256' | string; -interface CSRCreationOptions { +export interface CSRCreationOptions { /** * Optional client key to use */ @@ -81,7 +81,7 @@ interface CSRCreationOptions { altNames?: string[]; } -interface CertificateCreationOptions extends CSRCreationOptions { +export interface CertificateCreationOptions extends CSRCreationOptions { /** * Private key for signing the certificate, if not defined a new one is generated */ @@ -118,14 +118,14 @@ interface CertificateCreationOptions extends CSRCreationOptions { config?: string; } -interface CertificateCreationResult { +export interface CertificateCreationResult { certificate: any; csr: string; clientKey: string; serviceKey: string; } -interface CertificateSubjectReadResult { +export interface CertificateSubjectReadResult { country: string; state: string; locality: string; @@ -135,7 +135,7 @@ interface CertificateSubjectReadResult { emailAddress: string; } -type Callback = (error: any, result: T) => any; +export type Callback = (error: any, result: T) => any; /** * Creates a private key diff --git a/types/prismjs/index.d.ts b/types/prismjs/index.d.ts index b08c907bde..805410d12e 100644 --- a/types/prismjs/index.d.ts +++ b/types/prismjs/index.d.ts @@ -65,7 +65,7 @@ export function tokenize(text: string, grammar: LanguageDefinition): Array void; -type AvailableHooks = "before-highlightall" +export type HookCallback = (env: Environment) => void; +export type AvailableHooks = "before-highlightall" | "before-sanity-check" | "before-highlight" | "before-insert" @@ -174,7 +174,7 @@ type AvailableHooks = "before-highlightall" | "complete" | "wrap"; -interface Hooks { +export interface Hooks { all: Array void>>; add(name: AvailableHooks | string, callback: HookCallback): void; @@ -182,7 +182,7 @@ interface Hooks { run(name: AvailableHooks | string, env: Environment): void; } -type TokenNode = Token | string | Array; +export type TokenNode = Token | string | Array; export class Token { /** diff --git a/types/protractor-browser-logs/index.d.ts b/types/protractor-browser-logs/index.d.ts index b2a4a91fac..276c22fad8 100644 --- a/types/protractor-browser-logs/index.d.ts +++ b/types/protractor-browser-logs/index.d.ts @@ -8,13 +8,13 @@ import * as webdriver from 'selenium-webdriver'; import Entry = webdriver.logging.Entry; import { ProtractorBrowser } from 'protractor/built'; -interface BrowserLogOptions { +export interface BrowserLogOptions { reporters?: Array<(entries: Entry[]) => void>; } -type matchPredicateFunction = (entry: Entry) => boolean; -type matchPredicate = string | RegExp | matchPredicateFunction; -interface BrowserLogs { +export type matchPredicateFunction = (entry: Entry) => boolean; +export type matchPredicate = string | RegExp | matchPredicateFunction; +export interface BrowserLogs { ERROR: matchPredicateFunction; WARNING: matchPredicateFunction; DEBUG: matchPredicateFunction; diff --git a/types/react-event-listener/index.d.ts b/types/react-event-listener/index.d.ts index 906e3711e0..ce45c2612d 100644 --- a/types/react-event-listener/index.d.ts +++ b/types/react-event-listener/index.d.ts @@ -6,7 +6,7 @@ import * as React from "react"; -interface EventOptions { +export interface EventOptions { /** * @default false */ diff --git a/types/react-joyride/index.d.ts b/types/react-joyride/index.d.ts index ebc086770b..1bc2399769 100644 --- a/types/react-joyride/index.d.ts +++ b/types/react-joyride/index.d.ts @@ -28,7 +28,7 @@ export interface Progress { step: Step; } -interface Locale { +export interface Locale { back?: string; close?: string; last?: string; @@ -36,7 +36,7 @@ interface Locale { skip?: string; } -interface Props { +export interface Props { /** * The tour's steps. Defaults to [] */ diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index 9414e11f77..f98adf815d 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -10,14 +10,14 @@ import * as React from 'react'; // All events need to be lowercase so they don't collide with React.DOMAttributes // which already declares things with some of the same names -interface LeafletLayerEvents { +export interface LeafletLayerEvents { onbaselayerchange?(event: Leaflet.LayersControlEvent): void; onoverlayadd?(event: Leaflet.LayersControlEvent): void; onoverlayremove?(event: Leaflet.LayersControlEvent): void; onlayeradd?(event: Leaflet.LayerEvent): void; onlayerremove?(event: Leaflet.LayerEvent): void; } -interface LeafletMapStateChangeEvents { +export interface LeafletMapStateChangeEvents { onzoomlevelschange?(event: Leaflet.Event): void; onresize?(event: Leaflet.ResizeEvent): void; onunload?(event: Leaflet.Event): void; @@ -30,20 +30,20 @@ interface LeafletMapStateChangeEvents { onzoomend?(event: Leaflet.Event): void; onmoveend?(event: Leaflet.Event): void; } -interface LeafletPopupEvents { +export interface LeafletPopupEvents { onpopupopen?(event: Leaflet.PopupEvent): void; onpopupclose?(event: Leaflet.PopupEvent): void; onautopanstart?(event: Leaflet.Event): void; } -interface LeafletTooltipEvents { +export interface LeafletTooltipEvents { ontooltipopen?(event: Leaflet.TooltipEvent): void; ontooltipclose?(event: Leaflet.TooltipEvent): void; } -interface LeafletLocationEvents { +export interface LeafletLocationEvents { onlocationerror?(event: Leaflet.ErrorEvent): void; onlocationfound?(event: Leaflet.LocationEvent): void; } -interface LeafletInteractionEvents { +export interface LeafletInteractionEvents { onclick?(event: Leaflet.MouseEvent): void; ondblclick?(event: Leaflet.MouseEvent): void; onmousedown?(event: Leaflet.MouseEvent): void; @@ -55,10 +55,10 @@ interface LeafletInteractionEvents { onkeypress?(event: Leaflet.KeyboardEvent): void; onpreclick?(event: Leaflet.MouseEvent): void; } -interface LeafletOtherEvents { +export interface LeafletOtherEvents { onzoomanim?(event: Leaflet.ZoomAnimEvent): void; } -interface LeafletDraggingEvents { +export interface LeafletDraggingEvents { ondragstart?(event: Leaflet.Event): void; onmovestart?(event: Leaflet.Event): void; ondrag?(event: Leaflet.Event): void; @@ -66,7 +66,7 @@ interface LeafletDraggingEvents { onmoveend?(event: Leaflet.Event): void; } -interface MapProps extends React.HTMLProps, +export interface MapProps extends React.HTMLProps, LeafletLayerEvents, LeafletMapStateChangeEvents, LeafletPopupEvents, LeafletTooltipEvents, LeafletLocationEvents, LeafletInteractionEvents, LeafletOtherEvents, Leaflet.MapOptions { animate?: boolean; bounds?: Leaflet.LatLngBoundsExpression; @@ -77,13 +77,13 @@ interface MapProps extends React.HTMLProps, id?: string; } -type Map = React.ComponentClass; +export type Map = React.ComponentClass; export const Map: Map; -interface MapInstance extends React.Component { +export interface MapInstance extends React.Component { leafletElement: Leaflet.Map; } -interface PaneProps { +export interface PaneProps { name?: string; style?: React.CSSProperties; className?: string; @@ -91,7 +91,7 @@ interface PaneProps { export const Pane: React.ComponentClass; // There is no Layer class, these are the base props for all layers on the map -interface LayerProps extends LeafletInteractionEvents { +export interface LayerProps extends LeafletInteractionEvents { onadd?(event: Leaflet.Event): void; onremove?(event: Leaflet.Event): void; @@ -104,7 +104,7 @@ interface LayerProps extends LeafletInteractionEvents { ontooltipclose?(event: Leaflet.TooltipEvent): void; } -interface MarkerProps extends LayerProps, LeafletDraggingEvents { +export interface MarkerProps extends LayerProps, LeafletDraggingEvents { position: Leaflet.LatLngExpression; draggable?: boolean; icon?: Leaflet.BaseIcon; @@ -112,20 +112,20 @@ interface MarkerProps extends LayerProps, LeafletDraggingEvents { opacity?: number; } export const Marker: React.ComponentClass; -interface MarkerInstance extends React.Component { +export interface MarkerInstance extends React.Component { leafletElement: Leaflet.Marker; } -interface PopupProps extends LayerProps, Leaflet.PopupOptions { +export interface PopupProps extends LayerProps, Leaflet.PopupOptions { position?: Leaflet.LatLngExpression; } export const Popup: React.ComponentClass; // tslint:disable-next-line:no-empty-interface -interface TooltipProps extends LayerProps, Leaflet.TooltipOptions { } +export interface TooltipProps extends LayerProps, Leaflet.TooltipOptions { } export const Tooltip: React.ComponentClass; -interface GridLayerProps extends LayerProps { +export interface GridLayerProps extends LayerProps { opacity?: number; zIndex?: number; @@ -138,73 +138,72 @@ interface GridLayerProps extends LayerProps { } export const GridLayer: React.ComponentClass; -interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions { +export interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions { url: string; } export const TileLayer: React.ComponentClass; -interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents { +export interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents { url: string; opacity?: string; } export const ImageOverlay: React.ComponentClass; -interface WMSTileLayerProps extends TileLayerProps { +export interface WMSTileLayerProps extends TileLayerProps { url: string; } export const WMSTileLayer: React.ComponentClass; // Path is an abstract class // tslint:disable-next-line:no-empty-interface -interface PathProps extends LeafletLayerEvents, LeafletInteractionEvents, Leaflet.PathOptions { -} +export interface PathProps extends LeafletLayerEvents, LeafletInteractionEvents, Leaflet.PathOptions {} -interface CircleProps extends PathProps { +export interface CircleProps extends PathProps { center: Leaflet.LatLngExpression; radius?: number; } export const Circle: React.ComponentClass; -interface CircleMarkerProps extends PathProps { +export interface CircleMarkerProps extends PathProps { center: Leaflet.LatLngExpression; radius?: number; } export const CircleMarker: React.ComponentClass; -interface PolylineProps extends PathProps { +export interface PolylineProps extends PathProps { positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][]; } export const Polyline: React.ComponentClass; -interface PolygonProps extends PathProps { +export interface PolygonProps extends PathProps { positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][] | Leaflet.LatLngExpression[][][]; } export const Polygon: React.ComponentClass; -interface RectangleProps extends PathProps { +export interface RectangleProps extends PathProps { bounds: Leaflet.LatLngBoundsExpression; } export const Rectangle: React.ComponentClass; // tslint:disable-next-line:no-empty-interface -interface LayerGroupProps extends LayerProps { } +export interface LayerGroupProps extends LayerProps { } export const LayerGroup: React.ComponentClass; // tslint:disable-next-line:no-empty-interface -interface FeatureGroupProps extends LayerGroupProps, Leaflet.PathOptions { } +export interface FeatureGroupProps extends LayerGroupProps, Leaflet.PathOptions { } export const FeatureGroup: React.ComponentClass; -interface GeoJSONProps extends FeatureGroupProps, Leaflet.GeoJSONOptions { +export interface GeoJSONProps extends FeatureGroupProps, Leaflet.GeoJSONOptions { data: GeoJSON.GeoJsonObject; } export const GeoJSON: React.ComponentClass; -interface AttributionControlProps { +export interface AttributionControlProps { position?: Leaflet.ControlPosition; } export const AttributionControl: React.ComponentClass; -interface LayersControlProps { +export interface LayersControlProps { position?: Leaflet.ControlPosition; } export const LayersControl: React.ComponentClass & { BaseLayer: LayersControl.BaseLayer, Overlay: LayersControl.Overlay }; @@ -218,19 +217,19 @@ export namespace LayersControl { type Overlay = React.ComponentClass; } -interface MapControlProps { +export interface MapControlProps { position?: Leaflet.ControlPosition; } export class MapControl extends React.Component { leafletElement?: L.Control; } -interface ScaleControlProps { +export interface ScaleControlProps { position: Leaflet.ControlPosition; } export const ScaleControl: React.ComponentClass; -interface ZoomControlProps { +export interface ZoomControlProps { position: Leaflet.ControlPosition; } export const ZoomControl: React.ComponentClass; diff --git a/types/react-native-fs/index.d.ts b/types/react-native-fs/index.d.ts index 398657967c..7894b1eea0 100644 --- a/types/react-native-fs/index.d.ts +++ b/types/react-native-fs/index.d.ts @@ -6,7 +6,7 @@ /// -interface ReadDirItem { +export interface ReadDirItem { // The name of the item name: string; // The absolute path to the item @@ -19,7 +19,7 @@ interface ReadDirItem { isDirectory(): boolean; } -interface StatResult { +export interface StatResult { // The name of the item name: string; // The absolute path to the item @@ -34,17 +34,17 @@ interface StatResult { isDirectory(): boolean; } -interface Headers { +export interface Headers { [index: string]: string; } -type Fields = Headers; +export type Fields = Headers; -interface MkdirOptions { +export interface MkdirOptions { // iOS only NSURLIsExcludedFromBackupKey?: boolean; } -interface DownloadResult { +export interface DownloadResult { // The download job ID, required if one wishes to cancel the download. See `stopDownload`. jobId: number; // The HTTP status code @@ -53,10 +53,10 @@ interface DownloadResult { bytesWritten: number; } -type DownloadCallbackBegin = (res: DownloadBeginCallbackResult) => void; -type DownloadCallbackProgress = (res: DownloadProgressCallbackResult) => void; +export type DownloadCallbackBegin = (res: DownloadBeginCallbackResult) => void; +export type DownloadCallbackProgress = (res: DownloadProgressCallbackResult) => void; -interface DownloadFileOptions { +export interface DownloadFileOptions { // URL to download file from fromUrl: string; // Local filesystem path to save the file to @@ -69,7 +69,7 @@ interface DownloadFileOptions { progress?: DownloadCallbackProgress; } -interface DownloadProgressCallbackResult { +export interface DownloadProgressCallbackResult { // The download job ID, required if one wishes to cancel the download. See `stopDownload`. jobId: number; // The total size in bytes of the download resource @@ -78,7 +78,7 @@ interface DownloadProgressCallbackResult { bytesWritten: number; } -interface DownloadBeginCallbackResult { +export interface DownloadBeginCallbackResult { // The download job ID, required if one wishes to cancel the download. See `stopDownload`. jobId: number; // The HTTP status code @@ -89,10 +89,10 @@ interface DownloadBeginCallbackResult { headers: Headers; } -type UploadCallbackBegin = (res: UploadBeginCallbackResult) => void; -type UploadCallbackProgress = (res: UploadProgressCallbackResult) => void; +export type UploadCallbackBegin = (res: UploadBeginCallbackResult) => void; +export type UploadCallbackProgress = (res: UploadProgressCallbackResult) => void; -interface UploadFileOptions { +export interface UploadFileOptions { // URL to upload file to toUrl: string; // An array of objects with the file information to be uploaded. @@ -107,7 +107,7 @@ interface UploadFileOptions { progress?: UploadCallbackProgress; } -interface UploadResult { +export interface UploadResult { // The upload job ID, required if one wishes to cancel the upload. See `stopUpload`. jobId: number; // The HTTP status code @@ -118,7 +118,7 @@ interface UploadResult { body: string; } -interface UploadFileItem { +export interface UploadFileItem { // Name of the file, if not defined then filename is used name: string; // Name of file @@ -129,12 +129,12 @@ interface UploadFileItem { filetype: string; } -interface UploadBeginCallbackResult { +export interface UploadBeginCallbackResult { // The upload job ID, required if one wishes to cancel the upload. See `stopUpload`. jobId: number; } -interface UploadProgressCallbackResult { +export interface UploadProgressCallbackResult { // The upload job ID, required if one wishes to cancel the upload. See `stopUpload`. jobId: number; // The total number of bytes that will be sent to the server @@ -143,14 +143,14 @@ interface UploadProgressCallbackResult { totalBytesSent: number; } -interface FSInfoResult { +export interface FSInfoResult { // The total amount of storage space on the device (in bytes). totalSpace: number; // The amount of available storage space on the device (in bytes). freeSpace: number; } -interface JobReturnValue { +export interface JobReturnValue { jobId: number; promise: Promise; } diff --git a/types/react-native-google-analytics-bridge/index.d.ts b/types/react-native-google-analytics-bridge/index.d.ts index 1edf5514e2..a0b516c7ad 100644 --- a/types/react-native-google-analytics-bridge/index.d.ts +++ b/types/react-native-google-analytics-bridge/index.d.ts @@ -170,7 +170,7 @@ export class GoogleAnalyticsTracker { setSamplingRate(sampleRatio: number): void; } -interface GAEvent { +export interface GAEvent { event: string; payload: T; } diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 9ef7e5a247..89f0f080f5 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -34,7 +34,7 @@ export interface renderTabBarProperties { containerWidth: number; } -interface ScrollableTabViewProperties extends React.Props { +export interface ScrollableTabViewProperties extends React.Props { /** * tabBarPosition (String) Defaults to "top". * "bottom" to position the tab bar below content. diff --git a/types/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts index 8e7b8fe114..41c9722934 100644 --- a/types/react-native-swiper/index.d.ts +++ b/types/react-native-swiper/index.d.ts @@ -9,7 +9,7 @@ import { ViewStyle } from 'react-native'; -interface SwiperProperties extends React.Props { +export interface SwiperProperties extends React.Props { horizontal?: boolean; style?: ViewStyle; diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index db292d7f52..1e461590d5 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -9,7 +9,7 @@ import * as React from "react"; export { Modal, Overlay, Portal, Position } from "react-bootstrap"; // -interface AffixProps { +export interface AffixProps { /** * Pixels to offset from top of screen when calculating position */ @@ -87,7 +87,7 @@ interface AffixProps { export class Affix extends React.Component { } // -interface AutoAffixProps extends AffixProps { +export interface AutoAffixProps extends AffixProps { /** * The logical container node or component for determining offset from bottom * of viewport, or a function that returns it @@ -102,7 +102,7 @@ interface AutoAffixProps extends AffixProps { export class AutoAffix extends React.Component { } // -interface TransitionProps { +export interface TransitionProps { className?: string; /** diff --git a/types/react-test-renderer/index.d.ts b/types/react-test-renderer/index.d.ts index 927e041378..cb709587fc 100644 --- a/types/react-test-renderer/index.d.ts +++ b/types/react-test-renderer/index.d.ts @@ -6,16 +6,16 @@ import { ReactElement } from "react"; -interface Renderer { +export interface Renderer { toJSON(): ReactTestRendererJSON; } -interface ReactTestRendererJSON { +export interface ReactTestRendererJSON { type: string; props: { [propName: string]: string }; children: null | Array; $$typeof?: any; } -interface TestRendererOptions { +export interface TestRendererOptions { createNodeMock(element: ReactElement): any; } // https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155 diff --git a/types/react-toggle/index.d.ts b/types/react-toggle/index.d.ts index 29b3a547fd..658e3c0ead 100644 --- a/types/react-toggle/index.d.ts +++ b/types/react-toggle/index.d.ts @@ -6,12 +6,12 @@ import { Component, HTMLAttributes, ReactNode } from "react"; -interface ToggleIcons { +export interface ToggleIcons { checked?: ReactNode; unchecked?: ReactNode; } -interface ToggleProps extends HTMLAttributes { +export interface ToggleProps extends HTMLAttributes { "aria-labelledby"?: string; "aria-label"?: string; icons?: boolean | ToggleIcons; diff --git a/types/react-virtualized/dist/es/Masonry.d.ts b/types/react-virtualized/dist/es/Masonry.d.ts index eb44635978..25b790ced6 100644 --- a/types/react-virtualized/dist/es/Masonry.d.ts +++ b/types/react-virtualized/dist/es/Masonry.d.ts @@ -115,11 +115,11 @@ export class Masonry extends PureComponent { render(): JSX.Element; } -type emptyObject = {} +export type emptyObject = {} -type identity = (value: T) => T; +export type identity = (value: T) => T; -type noop = () => void; +export type noop = () => void; export type Position = { left: number, diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts index 118215f4fa..f5905adaf1 100644 --- a/types/react-virtualized/dist/es/Table.d.ts +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -202,7 +202,7 @@ export const defaultTableHeaderRenderer: () => Array // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type OptionType = string | number | RegExp | ((input: string) => boolean); +export type OptionType = string | number | RegExp | ((input: string) => boolean); -interface BasicOptions { +export interface BasicOptions { prompt?: any; hideEchoBack?: boolean; mask?: string; diff --git a/types/redux-action/index.d.ts b/types/redux-action/index.d.ts index eff19178e9..46a344d5a7 100644 --- a/types/redux-action/index.d.ts +++ b/types/redux-action/index.d.ts @@ -11,31 +11,31 @@ import * as Redux from 'redux'; export as namespace ReduxAction; -interface BaseAction { +export interface BaseAction { type: string; } -interface Action extends BaseAction { +export interface Action extends BaseAction { payload: Payload; } -interface MetaAction extends Action { +export interface MetaAction extends Action { meta: Meta; } -type ThunkAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; -type ThunkMetaAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; +export type ThunkAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; +export type ThunkMetaAction = (dispatch: Redux.Dispatch, getState: () => any) => Promise>; /** argument inferring borrowed from redux-actions definitions */ -type ActionFunction0 = () => R; -type ActionFunction1 = (t1: T1) => R; -type ActionFunction2 = (t1: T1, t2: T2) => R; -type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; -type ActionFunctionAny = (...args: any[]) => R; +export type ActionFunction0 = () => R; +export type ActionFunction1 = (t1: T1) => R; +export type ActionFunction2 = (t1: T1, t2: T2) => R; +export type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; +export type ActionFunctionAny = (...args: any[]) => R; -type ReducerHandler = (payload: any, state?: State, action?: A) => S; +export type ReducerHandler = (payload: any, state?: State, action?: A) => S; -interface ReducerHandlers { +export interface ReducerHandlers { [type: string]: ReducerHandler; } diff --git a/types/redux-actions/index.d.ts b/types/redux-actions/index.d.ts index 0353318031..7857532428 100644 --- a/types/redux-actions/index.d.ts +++ b/types/redux-actions/index.d.ts @@ -7,38 +7,38 @@ export as namespace ReduxActions; // FSA-compliant action. // See: https://github.com/acdlite/flux-standard-action -interface BaseAction { +export interface BaseAction { type: string; } -interface Action extends BaseAction { +export interface Action extends BaseAction { payload?: Payload; error?: boolean; } -interface ActionMeta extends Action { +export interface ActionMeta extends Action { meta: Meta; } -interface ReducerMap { +export interface ReducerMap { [actionType: string]: Reducer | ReducerNextThrow; } -interface ReducerMapMeta { +export interface ReducerMapMeta { [actionType: string]: Reducer | ReducerNextThrow; } -interface ReducerNextThrow { +export interface ReducerNextThrow { next?(state: State, action: Action): State; throw?(state: State, action: Action): State; } -interface ReducerNextThrowMeta { +export interface ReducerNextThrowMeta { next?(state: State, action: ActionMeta): State; throw?(state: State, action: ActionMeta): State; } -type ActionFunctions = +export type ActionFunctions = ActionFunction0> | ActionFunction1> | ActionFunction2> | @@ -46,17 +46,17 @@ type ActionFunctions = ActionFunction4> | ActionFunctionAny>; -type Reducer = (state: State, action: Action) => State; +export type Reducer = (state: State, action: Action) => State; -type ReducerMeta = (state: State, action: ActionMeta) => State; +export type ReducerMeta = (state: State, action: ActionMeta) => State; /** argument inferring borrowed from lodash definitions */ -type ActionFunction0 = () => R; -type ActionFunction1 = (t1: T1) => R; -type ActionFunction2 = (t1: T1, t2: T2) => R; -type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; -type ActionFunction4 = (t1: T1, t2: T2, t3: T3, t4: T4) => R; -type ActionFunctionAny = (...args: any[]) => R; +export type ActionFunction0 = () => R; +export type ActionFunction1 = (t1: T1) => R; +export type ActionFunction2 = (t1: T1, t2: T2) => R; +export type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; +export type ActionFunction4 = (t1: T1, t2: T2, t3: T3, t4: T4) => R; +export type ActionFunctionAny = (...args: any[]) => R; export function createAction( actionType: string, diff --git a/types/redux-auth-wrapper/index.d.ts b/types/redux-auth-wrapper/index.d.ts index 53029c1b15..e9b27d1481 100644 --- a/types/redux-auth-wrapper/index.d.ts +++ b/types/redux-auth-wrapper/index.d.ts @@ -8,9 +8,9 @@ import { ComponentClass, StatelessComponent, ReactType } from "react"; import { Action } from "redux"; import { Location } from "history"; -type ComponentConstructor

= ComponentClass

| StatelessComponent

; +export type ComponentConstructor

= ComponentClass

| StatelessComponent

; -interface InjectedProps { +export interface InjectedProps { authData?: AuthData; } @@ -28,6 +28,6 @@ export interface AuthWrapperConfig { redirectAction?(...args: any[]): Action; } -type AuthDecorator = (component: ComponentConstructor) => ComponentClass; +export type AuthDecorator = (component: ComponentConstructor) => ComponentClass; export function UserAuthWrapper(config: AuthWrapperConfig): AuthDecorator; diff --git a/types/redux-localstorage-debounce/index.d.ts b/types/redux-localstorage-debounce/index.d.ts index 5cdc5bbd40..1bba23fa77 100644 --- a/types/redux-localstorage-debounce/index.d.ts +++ b/types/redux-localstorage-debounce/index.d.ts @@ -5,7 +5,7 @@ import { StorageAdapter } from "redux-localstorage"; -interface DebounceOptions { +export interface DebounceOptions { maxWait?: number; [key: string]: any; } diff --git a/types/reflux/index.d.ts b/types/reflux/index.d.ts index 58177ee7fe..975e1b6e73 100644 --- a/types/reflux/index.d.ts +++ b/types/reflux/index.d.ts @@ -5,28 +5,28 @@ export as namespace Reflux; -interface StoreDefinition { +export interface StoreDefinition { listenables?: any[]; init?: Function; getInitialState?: Function; [propertyName: string]: any; } -interface ListenFn { +export interface ListenFn { (...params: any[]): any; completed: Function; failed: Function; } -interface Listenable { +export interface Listenable { listen: ListenFn; } -interface Subscription { +export interface Subscription { stop: Function; listenable: Listenable; } -interface Store { +export interface Store { hasListener(listenable: Listenable): boolean; listenToMany(listenables: Listenable[]): void; validateListening(listenable: Listenable): string; @@ -38,11 +38,11 @@ interface Store { listen(callback: Function, bindContext: any): Function; } -interface ActionsDefinition { +export interface ActionsDefinition { [index: string]: any; } -interface Actions { +export interface Actions { [index: string]: Listenable; } diff --git a/types/restify-plugins/index.d.ts b/types/restify-plugins/index.d.ts index d5009bce78..5f6be60f38 100644 --- a/types/restify-plugins/index.d.ts +++ b/types/restify-plugins/index.d.ts @@ -52,7 +52,7 @@ export namespace pre { */ export function acceptParser(accepts: string[]): RequestHandler; -interface AuditLoggerOptions { +export interface AuditLoggerOptions { /** * Bunyan logger */ @@ -79,7 +79,7 @@ interface AuditLoggerOptions { body?: boolean; } -interface AuditLoggerReturns { +export interface AuditLoggerReturns { req: Request; res: Response; route: Route; @@ -108,7 +108,7 @@ export function fullResponse(): RequestHandler; // ************ This module includes the following data parsing plugins: -interface BodyParserOptions { +export interface BodyParserOptions { /** * The maximum size in bytes allowed in the HTTP body. Useful for limiting clients from hogging server memory. */ @@ -193,7 +193,7 @@ export function bodyParser(options?: BodyParserOptions): RequestHandler[]; */ export function bodyReader( options?: {maxBodySize?: number} ): RequestHandler; -interface UrlEncodedBodyParser { +export interface UrlEncodedBodyParser { mapParams?: boolean; overrideParams?: boolean; } @@ -216,7 +216,7 @@ export function jsonBodyParser(options?: {mapParams?: boolean, reviver?: any, ov */ export function jsonp(): RequestHandler; -interface MultipartBodyParser { +export interface MultipartBodyParser { overrideParams?: boolean; multiples?: boolean; keepExtensions?: boolean; @@ -234,7 +234,7 @@ interface MultipartBodyParser { */ export function multipartBodyParser(options?: MultipartBodyParser): RequestHandler; -interface QueryParserOptions { +export interface QueryParserOptions { /** * Default `false`. Copies parsed query parameters into `req.params`. */ @@ -287,7 +287,7 @@ interface QueryParserOptions { */ export function queryParser(options?: QueryParserOptions): RequestHandler; -interface RequestLogger { +export interface RequestLogger { properties?: any; serializers?: any; headers?: any; @@ -315,7 +315,7 @@ export function dateParser(delta?: number): RequestHandler; */ export function gzipResponse(options?: any): RequestHandler; -interface ServeStatic { +export interface ServeStatic { appendRequestPath?: boolean | undefined; directory?: string; maxAge?: number; @@ -332,7 +332,7 @@ interface ServeStatic { */ export function serveStatic(options?: ServeStatic): RequestHandler; -interface ThrottleOptions { +export interface ThrottleOptions { burst?: number; rate?: number; ip?: boolean; @@ -343,7 +343,7 @@ interface ThrottleOptions { overrides?: any; // any } -interface MetricsCallback { +export interface MetricsCallback { /** * An error if the request had an error */ @@ -363,9 +363,9 @@ interface MetricsCallback { route: Route; } -type TMetricsCallback = 'close' | 'aborted' | undefined; +export type TMetricsCallback = 'close' | 'aborted' | undefined; -interface MetricsCallbackOptions { +export interface MetricsCallbackOptions { /** * Status code of the response. Can be undefined in the case of an `uncaughtException`. * Otherwise, in most normal scenarios, even calling `res.send()` or `res.end()` should result in a 200 by default. @@ -395,7 +395,7 @@ interface MetricsCallbackOptions { connectionState: TMetricsCallback; } -interface MetricsReturns { +export interface MetricsReturns { req: Request; res: Response; route: Route; @@ -431,7 +431,7 @@ export function oauth2TokenParser(): RequestHandler; */ export function throttle(options?: ThrottleOptions): RequestHandler; -interface RequestExpiryOptions { +export interface RequestExpiryOptions { /** * Header name of the absolute time for request expiration */ diff --git a/types/revalidate/index.d.ts b/types/revalidate/index.d.ts index c17837129a..54b437705b 100644 --- a/types/revalidate/index.d.ts +++ b/types/revalidate/index.d.ts @@ -25,7 +25,7 @@ export interface Config { message?: string; } -interface Multiple { +export interface Multiple { multiple?: boolean; } diff --git a/types/selenium-webdriver/chrome.d.ts b/types/selenium-webdriver/chrome.d.ts index 6bd2fe22a8..b6e16581d8 100644 --- a/types/selenium-webdriver/chrome.d.ts +++ b/types/selenium-webdriver/chrome.d.ts @@ -24,7 +24,7 @@ export class Driver extends webdriver.WebDriver { static createSession(opt_config?: Options | webdriver.CreateSessionCapabilities, opt_service?: remote.DriverService | http.Executor, opt_flow?: webdriver.promise.ControlFlow): Driver; } -interface IOptionsValues { +export interface IOptionsValues { args: string[]; binary?: string; detach: boolean; @@ -34,7 +34,7 @@ interface IOptionsValues { prefs?: any; } -interface IPerfLoggingPrefs { +export interface IPerfLoggingPrefs { enableNetwork: boolean; enablePage: boolean; enableTimeline: boolean; diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index 08b77d0ce1..316b242b28 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -1511,17 +1511,17 @@ export namespace until { function urlMatches(regex: RegExp): Condition; } -interface ILocation { +export interface ILocation { x: number; y: number; } -interface ISize { +export interface ISize { width: number; height: number; } -interface IButton { +export interface IButton { LEFT: string; MIDDLE: string; RIGHT: string; @@ -1536,7 +1536,7 @@ interface IButton { */ export const Button: IButton; -interface IKey { +export interface IKey { NULL: string; CANCEL: string; // ^break HELP: string; @@ -1927,12 +1927,12 @@ export class TouchSequence { flickElement(elem: WebElement, offset: IOffset, speed: number): TouchSequence; } -interface IOffset { +export interface IOffset { x: number; y: number; } -interface ISpeed { +export interface ISpeed { xspeed: number; yspeed: number; } @@ -2070,7 +2070,7 @@ export class AlertPromise extends Alert implements promise.IThenable { * Recognized browser names. * @enum {string} */ -interface IBrowser { +export interface IBrowser { ANDROID: string; CHROME: string; EDGE: string; @@ -2087,7 +2087,7 @@ interface IBrowser { export const Browser: IBrowser; -interface ProxyConfig { +export interface ProxyConfig { proxyType: string; proxyAutoconfigUrl?: string; ftpProxy?: string; @@ -2498,7 +2498,7 @@ export class By { * {tagName: string}| * {xpath: string})} */ -type ByHash = { className: string } | +export type ByHash = { className: string } | { css: string } | { id: string } | { js: string } | @@ -2508,13 +2508,13 @@ type ByHash = { className: string } | { tagName: string } | { xpath: string }; - export type Locator = By | Function | ByHash; +export type Locator = By | Function | ByHash; /** * Common webdriver capability keys. * @enum {string} */ -interface ICapability { +export interface ICapability { /** * Indicates whether a driver should accept all SSL certs by default. This * capability only applies when requesting a new session. To query whether @@ -2765,7 +2765,7 @@ export class Capabilities { /** * An enumeration of valid command string. */ -interface ICommandName { +export interface ICommandName { GET_SERVER_STATUS: string; NEW_SESSION: string; @@ -3110,7 +3110,7 @@ export class Navigation { // endregion } -interface IWebDriverOptionsCookie { +export interface IWebDriverOptionsCookie { /** * The name of the cookie. */ @@ -3157,9 +3157,9 @@ interface IWebDriverOptionsCookie { * @type {(!Date|number|undefined)} */ expiry?: number | Date; - } +} - interface IWebDriverCookie extends IWebDriverOptionsCookie { +export interface IWebDriverCookie extends IWebDriverOptionsCookie { /** * When the cookie expires. * @@ -3539,10 +3539,10 @@ export class FileDetector { handleFile(driver: WebDriver, path: string): promise.Promise; } - type CreateSessionCapabilities = Capabilities | { - desired?: Capabilities, - required?: Capabilities - }; +export type CreateSessionCapabilities = Capabilities | { + desired?: Capabilities, + required?: Capabilities +}; /** * Creates a new WebDriver client, which provides control over a browser. @@ -4105,25 +4105,25 @@ export class WebDriver { // endregion } - /** - * A thenable wrapper around a {@linkplain webdriver.IWebDriver IWebDriver} - * instance that allows commands to be issued directly instead of having to - * repeatedly call `then`: - * - * let driver = new Builder().build(); - * driver.then(d => d.get(url)); // You can do this... - * driver.get(url); // ...or this - * - * If the driver instance fails to resolve (e.g. the session cannot be created), - * every issued command will fail. - * - * @extends {webdriver.IWebDriver} - * @extends {promise.IThenable} - * @interface - */ - interface ThenableWebDriver extends WebDriver, promise.IThenable { } +/** + * A thenable wrapper around a {@linkplain webdriver.IWebDriver IWebDriver} + * instance that allows commands to be issued directly instead of having to + * repeatedly call `then`: + * + * let driver = new Builder().build(); + * driver.then(d => d.get(url)); // You can do this... + * driver.get(url); // ...or this + * + * If the driver instance fails to resolve (e.g. the session cannot be created), + * every issued command will fail. + * + * @extends {webdriver.IWebDriver} + * @extends {promise.IThenable} + * @interface + */ +export interface ThenableWebDriver extends WebDriver, promise.IThenable { } -interface IWebElementId { +export interface IWebElementId { [ELEMENT: string]: string; } @@ -4150,7 +4150,7 @@ interface IWebElementId { * }); * */ -interface IWebElement { +export interface IWebElement { // region Methods /** @@ -4345,7 +4345,7 @@ interface IWebElement { // endregion } -interface IWebElementFinders { +export interface IWebElementFinders { /** * Schedule a command to find a descendant of this element. If the element * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will @@ -4407,7 +4407,7 @@ interface IWebElementFinders { * @constructor * @template T */ -interface Serializable { +export interface Serializable { /** * Returns either this instance's serialized represention, if immediately * available, or a promise for its serialized representation. This function is diff --git a/types/selenium-webdriver/remote.d.ts b/types/selenium-webdriver/remote.d.ts index 82924b896c..d1c5e4616c 100644 --- a/types/selenium-webdriver/remote.d.ts +++ b/types/selenium-webdriver/remote.d.ts @@ -6,7 +6,7 @@ import * as webdriver from './index'; * * @record */ -interface ServiceOptions { } +export interface ServiceOptions { } /** * Manages the life and death of a native executable WebDriver server. diff --git a/types/shipit-utils/index.d.ts b/types/shipit-utils/index.d.ts index aec379f5f2..64a62f2d61 100644 --- a/types/shipit-utils/index.d.ts +++ b/types/shipit-utils/index.d.ts @@ -5,8 +5,8 @@ import shipit = require("shipit"); -type GruntOrShipit = typeof shipit | {}; -type EmptyCallback = () => void; +export type GruntOrShipit = typeof shipit | {}; +export type EmptyCallback = () => void; export function equalValues(value: any[]): void; export function getShipit(gruntOrShipit: GruntOrShipit): typeof shipit; diff --git a/types/shipit/index.d.ts b/types/shipit/index.d.ts index 3146b82fb0..a4ce705fac 100644 --- a/types/shipit/index.d.ts +++ b/types/shipit/index.d.ts @@ -9,27 +9,27 @@ import * as fs from "fs"; import * as child_process from "child_process"; import * as shipit from "./index"; // Used for `typeof shipit` -type LocalOrRemoteCommand = (command: string, options?: child_process.ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void) => PromiseLike; -type EmptyCallback = () => void; -type TaskExecution = (name: string, depsOrFn: string[] | EmptyCallback, fn: () => void) => any; +export type LocalOrRemoteCommand = (command: string, options?: child_process.ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void) => PromiseLike; +export type EmptyCallback = () => void; +export type TaskExecution = (name: string, depsOrFn: string[] | EmptyCallback, fn: () => void) => any; -interface Options { +export interface Options { environment: string; stderr: fs.WriteStream; stdout: fs.WriteStream; } -interface ShipitLocal { +export interface ShipitLocal { child: child_process.ChildProcess; stderr: fs.WriteStream; stdout: fs.WriteStream; } -interface Tasks { +export interface Tasks { [name: string]: Task; } -interface Task { +export interface Task { blocking: boolean; dep: string[]; fn(): void; diff --git a/types/simple-oauth2/index.d.ts b/types/simple-oauth2/index.d.ts index ec4c1eba83..a192e6879b 100644 --- a/types/simple-oauth2/index.d.ts +++ b/types/simple-oauth2/index.d.ts @@ -8,7 +8,7 @@ import Bluebird = require("bluebird"); /** Creates a new simple-oauth2 client with the passed configuration */ export function create(options: ModuleOptions): OAuthClient; -interface ModuleOptions { +export interface ModuleOptions { client: { /** Service registered client id. Required. */ id: string, @@ -41,9 +41,9 @@ interface ModuleOptions { }; } -type TokenType = "access_token" | "refresh_token"; +export type TokenType = "access_token" | "refresh_token"; -interface AccessToken { +export interface AccessToken { token: {}; /** Check if the access token is expired or not */ @@ -55,16 +55,16 @@ interface AccessToken { revoke(tokenType: TokenType, callback?: (error: any) => void): Bluebird; } -interface Token { +export interface Token { [x: string]: any; } -type AuthorizationCode = string; -interface AuthorizationTokenConfig { +export type AuthorizationCode = string; +export interface AuthorizationTokenConfig { code: AuthorizationCode; redirect_uri: string; } -interface PasswordTokenConfig { +export interface PasswordTokenConfig { /** A string that represents the registered username */ username: string; /** A string that represents the registered password. */ @@ -73,7 +73,7 @@ interface PasswordTokenConfig { scope: string; } -interface ClientCredentialTokenConfig { +export interface ClientCredentialTokenConfig { /** A string that represents the application privileges */ scope?: string; } diff --git a/types/smooth-scrollbar/index.d.ts b/types/smooth-scrollbar/index.d.ts index f6a65ca958..74feda3351 100644 --- a/types/smooth-scrollbar/index.d.ts +++ b/types/smooth-scrollbar/index.d.ts @@ -68,7 +68,7 @@ export interface ScrollbarTargets { }; } -interface ScrollIntoViewOptions { +export interface ScrollIntoViewOptions { /** * scrolling stop offset to top edge of container * @default 0 diff --git a/types/swagger-node-runner/index.d.ts b/types/swagger-node-runner/index.d.ts index abb0d991ef..51d9f5ff26 100644 --- a/types/swagger-node-runner/index.d.ts +++ b/types/swagger-node-runner/index.d.ts @@ -92,13 +92,13 @@ export interface Config { } /** Internally stored version of config */ -interface ConfigInternal { +export interface ConfigInternal { /** Config of SwaggerNodeRunner */ swagger?: Config; } /** Middleware used by `swagger-tools` */ -type SwaggerToolsMiddleware = (req: any, res: any, next: any) => any; +export type SwaggerToolsMiddleware = (req: any, res: any, next: any) => any; /** * @param {any} request @@ -116,7 +116,7 @@ export type SwaggerToolsSecurityHandler = (request: any, securityDefinition: any * The keys match SecurityDefinition names and the associated values are functions that accept the following parameters: * `(request, securityDefinition, scopes, callback)` */ -interface SwaggerSecurityHandlers { +export interface SwaggerSecurityHandlers { [name: string]: SwaggerToolsSecurityHandler; } @@ -201,7 +201,7 @@ export interface Runner extends EventEmitter { } /** base used by all middleware versions */ -interface Middleware { +export interface Middleware { /** Back-reference to `Runner` that has created this middleware */ runner: Runner; } diff --git a/types/swagger-schema-official/index.d.ts b/types/swagger-schema-official/index.d.ts index f988d75831..903ecc8ffb 100644 --- a/types/swagger-schema-official/index.d.ts +++ b/types/swagger-schema-official/index.d.ts @@ -39,7 +39,7 @@ export interface Header extends BaseSchema { } // ----------------------------- Parameter ----------------------------------- -interface BaseParameter { +export interface BaseParameter { name: string; in: string; required?: boolean; @@ -69,7 +69,7 @@ export interface FormDataParameter extends BaseParameter, BaseSchema { collectionFormat?: string; } -type Parameter = +export type Parameter = BodyParameter | FormDataParameter | QueryParameter | @@ -114,7 +114,7 @@ export interface Response { } // ------------------------------ Schema ------------------------------------- -interface BaseSchema { +export interface BaseSchema { format?: string; title?: string; description?: string; @@ -159,7 +159,7 @@ export interface XML { } // ----------------------------- Security ------------------------------------ -interface BaseSecurity { +export interface BaseSecurity { type: string; description?: string; } @@ -174,7 +174,7 @@ export interface ApiKeySecurity extends BaseSecurity { in: string; } -interface BaseOAuthSecuirty extends BaseSecurity { +export interface BaseOAuthSecuirty extends BaseSecurity { flow: string; } @@ -202,7 +202,7 @@ export interface OAuthScope { [scopeName: string]: string; } -type Security = +export type Security = BasicAuthenticationSecurity | OAuth2AccessCodeSecurity | OAuth2ApplicationSecurity | diff --git a/types/usb/index.d.ts b/types/usb/index.d.ts index 4075023650..20da725cf6 100644 --- a/types/usb/index.d.ts +++ b/types/usb/index.d.ts @@ -81,7 +81,7 @@ export class InterfaceDescriptor { extra: Buffer; } -interface Endpoint { +export interface Endpoint { direction: string; transferType: number; timeout: number; diff --git a/types/vinyl-fs/index.d.ts b/types/vinyl-fs/index.d.ts index 46510032ee..dfe59301eb 100644 --- a/types/vinyl-fs/index.d.ts +++ b/types/vinyl-fs/index.d.ts @@ -17,7 +17,7 @@ import * as _events from 'events'; import * as File from 'vinyl'; import * as globStream from 'glob-stream'; -interface SrcOptions extends globStream.Options { +export interface SrcOptions extends globStream.Options { /** Prevents stream from emitting an error when file not found. */ allowEmpty?: boolean; diff --git a/types/vis/index.d.ts b/types/vis/index.d.ts index 3b94d694f9..b265ce5693 100644 --- a/types/vis/index.d.ts +++ b/types/vis/index.d.ts @@ -8,15 +8,15 @@ // Matthieu Maitre // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type IdType = string | number; -type SubgroupType = IdType; -type DateType = Date | number | string; -type HeightWidthType = IdType; -type TimelineTimeAxisScaleType = 'millisecond' | 'second' | 'minute' | 'hour' | +export type IdType = string | number; +export type SubgroupType = IdType; +export type DateType = Date | number | string; +export type HeightWidthType = IdType; +export type TimelineTimeAxisScaleType = 'millisecond' | 'second' | 'minute' | 'hour' | 'weekday' | 'day' | 'month' | 'year'; -type TimelineEventPropertiesResultWhatType = 'item' | 'background' | 'axis' | +export type TimelineEventPropertiesResultWhatType = 'item' | 'background' | 'axis' | 'group-label' | 'custom-time' | 'current-time'; -type TimelineEvents = +export type TimelineEvents = 'currentTimeTick' | 'click' | 'contextmenu' | @@ -30,20 +30,20 @@ type TimelineEvents = 'itemout' | 'timechange' | 'timechanged'; -type Graph2dStyleType = 'line' | 'bar' | 'points'; -type Graph2dBarChartAlign = 'left' | 'center' | 'right'; -type Graph2dDrawPointsStyle = 'square' | 'circle'; -type LegendPositionType = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; -type ParametrizationInterpolationType = 'centripetal' | 'chordal' | 'uniform' | 'disabled'; -type TopBottomEnumType = 'top' | 'bottom'; -type RightLeftEnumType = 'right' | 'left'; +export type Graph2dStyleType = 'line' | 'bar' | 'points'; +export type Graph2dBarChartAlign = 'left' | 'center' | 'right'; +export type Graph2dDrawPointsStyle = 'square' | 'circle'; +export type LegendPositionType = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; +export type ParametrizationInterpolationType = 'centripetal' | 'chordal' | 'uniform' | 'disabled'; +export type TopBottomEnumType = 'top' | 'bottom'; +export type RightLeftEnumType = 'right' | 'left'; -interface LegendPositionOptions { +export interface LegendPositionOptions { visible?: boolean; position?: LegendPositionType; } -interface LegendOptions { +export interface LegendOptions { enabled?: boolean; icons?: boolean; iconSize?: number; @@ -52,7 +52,7 @@ interface LegendOptions { right?: LegendPositionOptions; } -interface DataItem { +export interface DataItem { className?: string; content: string; end?: DateType; @@ -66,12 +66,12 @@ interface DataItem { editable?: boolean; } -interface PointItem extends DataItem { +export interface PointItem extends DataItem { x: string; y: number; } -interface DataGroup { +export interface DataGroup { className?: string; content: string; id: IdType; @@ -81,7 +81,7 @@ interface DataGroup { title?: string; } -interface DataGroupOptions { +export interface DataGroupOptions { drawPoints?: Graph2dDrawPointsOption | (() => void); // TODO excludeFromLegend?: boolean; interpolation?: boolean | InterpolationOptions; @@ -90,58 +90,57 @@ interface DataGroupOptions { yAxisOrientation?: RightLeftEnumType; } -interface InterpolationOptions { +export interface InterpolationOptions { parametrization: ParametrizationInterpolationType; } -interface TimelineEditableOption { +export interface TimelineEditableOption { add?: boolean; remove?: boolean; updateGroup?: boolean; updateTime?: boolean; } -interface TimelineGroupEditableOption { +export interface TimelineGroupEditableOption { add?: boolean; remove?: boolean; order?: boolean; } -interface TimelineMarginItem { +export interface TimelineMarginItem { horizontal?: number; vertical?: number; } -type TimelineMarginItemType = number | TimelineMarginItem; +export type TimelineMarginItemType = number | TimelineMarginItem; -interface TimelineMarginOption { +export interface TimelineMarginOption { axis?: number; item?: TimelineMarginItemType; } -interface TimelineOrientationOption { +export interface TimelineOrientationOption { axis?: string; item?: string; } -interface TimelineTimeAxisOption { +export interface TimelineTimeAxisOption { scale?: TimelineTimeAxisScaleType; step?: number; } -type TimelineOptionsConfigureFunction = (option: string, path: string[]) => boolean; -type TimelineOptionsConfigureType = boolean | TimelineOptionsConfigureFunction; -type TimelineOptionsDataAttributesType = boolean | string | string[]; -type TimelineOptionsEditableType = boolean | TimelineEditableOption; -type TimelineOptionsGroupEditableType = boolean | TimelineGroupEditableOption; -type TimelineOptionsGroupOrderType = string | (() => void); // TODO -type TimelineOptionsGroupOrderSwapFunction = (fromGroup: any, toGroup: any, groups: DataSet) => void; -type TimelineOptionsMarginType = number | TimelineMarginOption; -type TimelineOptionsOrientationType = string | TimelineOrientationOption; -type TimelineOptionsSnapFunction = (date: Date, scale: string, step: number) => Date | number; -// type TimelineOptions = +export type TimelineOptionsConfigureFunction = (option: string, path: string[]) => boolean; +export type TimelineOptionsConfigureType = boolean | TimelineOptionsConfigureFunction; +export type TimelineOptionsDataAttributesType = boolean | string | string[]; +export type TimelineOptionsEditableType = boolean | TimelineEditableOption; +export type TimelineOptionsGroupEditableType = boolean | TimelineGroupEditableOption; +export type TimelineOptionsGroupOrderType = string | (() => void); // TODO +export type TimelineOptionsGroupOrderSwapFunction = (fromGroup: any, toGroup: any, groups: DataSet) => void; +export type TimelineOptionsMarginType = number | TimelineMarginOption; +export type TimelineOptionsOrientationType = string | TimelineOrientationOption; +export type TimelineOptionsSnapFunction = (date: Date, scale: string, step: number) => Date | number; -interface TimelineOptions { +export interface TimelineOptions { align?: string; autoResize?: boolean; clickToUse?: boolean; @@ -201,18 +200,18 @@ interface TimelineOptions { zoomMin?: number; } -interface TimelineFitAnimation { +export interface TimelineFitAnimation { duration?: number; easingFunction?: string; } -type TimelineFitAnimationType = boolean | TimelineFitAnimation; +export type TimelineFitAnimationType = boolean | TimelineFitAnimation; -interface TimelineFitOptions { +export interface TimelineFitOptions { animation?: TimelineFitAnimationType; } -interface TimelineEventPropertiesResult { +export interface TimelineEventPropertiesResult { group?: number; item?: number; pageX: number; @@ -230,7 +229,7 @@ interface TimelineEventPropertiesResult { * * @interface DataSetOptions */ -interface DataSetOptions extends DataSetQueueOptions { +export interface DataSetOptions extends DataSetQueueOptions { /** * The name of the field containing the id of the items. * When data is fetched from a server which uses some specific field to identify items, @@ -256,7 +255,7 @@ interface DataSetOptions extends DataSetQueueOptions { type?: any; } -interface DataSetQueueOptions { +export interface DataSetQueueOptions { /** * Queue data changes ('add', 'update', 'remove') and flush them at once. * The queue can be flushed manually by calling DataSet.flush(), @@ -502,7 +501,7 @@ export class DataSet { * * @interface DataSelectionOptions */ -interface DataSelectionOptions { +export interface DataSelectionOptions { /** * An array with field names, or an object with current field name * and new field name that the field is returned as. @@ -564,33 +563,33 @@ export class DataView { constructor(items: T[]); } -type DataItemCollectionType = DataItem[] | DataSet | DataView; -type DataGroupCollectionType = DataGroup[] | DataSet | DataView; +export type DataItemCollectionType = DataItem[] | DataSet | DataView; +export type DataGroupCollectionType = DataGroup[] | DataSet | DataView; -interface TitleOption { +export interface TitleOption { text?: string; style?: string; } -interface RangeType { +export interface RangeType { min: IdType; max: IdType; } -interface DataAxisSideOption { +export interface DataAxisSideOption { range?: RangeType; format?(): string; title?: TitleOption; } -interface Graph2dBarChartOption { +export interface Graph2dBarChartOption { width?: number; minWidth?: number; sideBySide?: boolean; align?: Graph2dBarChartAlign; } -interface Graph2dDataAxisOption { +export interface Graph2dDataAxisOption { orientation?: TimelineOptionsOrientationType; showMinorLabels?: boolean; showMajorLabels?: boolean; @@ -607,24 +606,24 @@ interface Graph2dDataAxisOption { right?: DataAxisSideOption; } -interface Graph2dDrawPointsOption { +export interface Graph2dDrawPointsOption { enabled?: boolean; onRender?(): boolean; // TODO size?: number; style: Graph2dDrawPointsStyle; } -interface Graph2dShadedOption { +export interface Graph2dShadedOption { orientation?: TopBottomEnumType; groupid?: IdType; } -type Graph2dOptionBarChart = number | Graph2dBarChartOption; -type Graph2dOptionDataAxis = boolean | Graph2dDataAxisOption; -type Graph2dOptionDrawPoints = boolean | Graph2dDrawPointsOption; -type Graph2dLegendOption = boolean | LegendOptions; +export type Graph2dOptionBarChart = number | Graph2dBarChartOption; +export type Graph2dOptionDataAxis = boolean | Graph2dDataAxisOption; +export type Graph2dOptionDrawPoints = boolean | Graph2dDrawPointsOption; +export type Graph2dLegendOption = boolean | LegendOptions; -interface Graph2dOptions { +export interface Graph2dOptions { autoResize?: boolean; barChart?: Graph2dOptionBarChart; clickToUse?: boolean; @@ -795,7 +794,7 @@ export interface VisSelectProperties { items: number[]; } -type NetworkEvents = +export type NetworkEvents = 'click' | 'doubleClick' | 'oncontext' | diff --git a/types/yeoman-generator/index.d.ts b/types/yeoman-generator/index.d.ts index 5f6e79896a..6e5517ced2 100644 --- a/types/yeoman-generator/index.d.ts +++ b/types/yeoman-generator/index.d.ts @@ -6,7 +6,7 @@ import { EventEmitter } from 'events'; import { Questions, Answers } from 'inquirer'; -declare type Callback = (err: any) => void; +type Callback = (err: any) => void; declare namespace Base { class Storage {