Use new strict-export-declare-modifiers lint rule (#15844)

This commit is contained in:
Andy 2017-04-14 08:20:12 -07:00 committed by GitHub
parent 94f2f1d455
commit e50f8878a5
71 changed files with 415 additions and 406 deletions

View File

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

18
types/code/index.d.ts vendored
View File

@ -16,13 +16,13 @@ export function thrownAt(error?: Error): CodeError;
/** Configure code. */
export const settings: Settings;
type AssertionChain<T> = Assertion<T> & Expectation<T>;
export type AssertionChain<T> = Assertion<T> & Expectation<T>;
type Assertion<T> = Grammar<T> & Flags<T>;
export type Assertion<T> = Grammar<T> & Flags<T>;
type Expectation<T> = Types<T> & Values<T>;
export type Expectation<T> = Types<T> & Values<T>;
interface Grammar<T> {
export interface Grammar<T> {
/** Connecting word. */
a: AssertionChain<T>;
/** Connecting word. */
@ -41,7 +41,7 @@ interface Grammar<T> {
to: AssertionChain<T>;
}
interface Flags<T> {
export interface Flags<T> {
/** Inverses the expected result of any assertion */
not: AssertionChain<T>;
/**
@ -66,7 +66,7 @@ interface Flags<T> {
shallow: AssertionChain<T>;
}
interface Types<T> {
export interface Types<T> {
/** Asserts that the reference value is an arguments object. */
arguments(): AssertionChain<T>;
/** Asserts that the reference value is an Array. */
@ -91,7 +91,7 @@ interface Types<T> {
object(): AssertionChain<T>;
}
interface Values<T> {
export interface Values<T> {
/** Asserts that the reference value is true. */
true(): AssertionChain<T>;
/** Asserts that the reference value is false. */
@ -170,7 +170,7 @@ interface Values<T> {
throws(type?: any, message?: string | RegExp): AssertionChain<T>;
}
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;

View File

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

View File

@ -3,7 +3,7 @@
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Color {
export interface Color {
(text: string): string;
strip: Color;

View File

@ -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 _/_
*/

View File

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

View File

@ -159,7 +159,7 @@ export function selectAll<GElement extends BaseType, OldDatum>(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<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> {
export interface Selection<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> {
// Sub-selection -------------------------
/**
@ -852,7 +852,7 @@ interface Selection<GElement extends BaseType, Datum, PElement extends BaseType,
* Selects the root element, document.documentElement. This function can also be used to test for selections
* (instanceof d3.selection) or to extend the selection prototype.
*/
type SelectionFn = () => Selection<HTMLElement, any, null, undefined>;
export type SelectionFn = () => Selection<HTMLElement, any, null, undefined>;
/**
* 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
*/

View File

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

View File

@ -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<any>, id: string, edge: dagre.Edge, type: string) => void };
(selection: d3.Selection<any>, g: dagre.graphlib.Graph): void;

View File

@ -20,7 +20,7 @@ export namespace graphlib {
export function layout(graph: graphlib.Graph): void;
interface Edge {
export interface Edge {
v: string;
w: string;
}

View File

@ -3,7 +3,7 @@
// Definitions by: Swanest <https://github.com/swanest>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface PushOpts {
export interface PushOpts {
filename?: string;
dropDatabase: boolean;
}

View File

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

View File

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

View File

@ -12,7 +12,7 @@
/// <reference types="cheerio" />
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<any, any> {
}
@ -21,11 +21,11 @@ export class ElementClass extends Component<any, any> {
* 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<Props> {
export interface ComponentClass<Props> {
new(props?: Props, context?: any): Component<Props, any>;
}
type StatelessComponent<Props> = (props: Props, context?: any) => JSX.Element;
export type StatelessComponent<Props> = (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<any> | ComponentClass<any> | EnzymePropSelector;
interface CommonWrapper<P, S> {
export interface CommonWrapper<P, S> {
/**
* Returns a new wrapper with only the nodes of the current wrapper that, when passed into the provided predicate function, return true.
* @param predicate

View File

@ -3,12 +3,12 @@
// Definitions by: Connor Peet <https://github.com/connor4312>
// 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;
}

View File

@ -5,6 +5,7 @@
"ban-types": false,
"interface-name": false,
"no-empty-interface": false,
"strict-export-declare-modifiers": false,
"unified-signatures": false
}
}

View File

@ -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<T> extends Observable<T> {
then<U>(onFulfilled?: (value: T) => U | Thenable<U>, onRejected?: (error: any) => void): Thenable<U>;
}
interface Thenable<T> {
export interface Thenable<T> {
then<U>(onFulfilled?: (value: T) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U> | void): Thenable<U>;
}
@ -251,19 +251,19 @@ export class Observable<T>{
/**
* This callback accepts a value that was emitted while evaluating the operation underlying the {@link Observable} stream.
*/
type ObservableOnNextCallback<T> = (value: T) => void;
export type ObservableOnNextCallback<T> = (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;
}

View File

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

View File

@ -13,11 +13,11 @@ export interface WriteOptions {
flag?: string;
}
type JsonReplacerArray = Array<number | string>;
export type JsonReplacerArray = Array<number | string>;
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;

View File

@ -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;
}
/**

View File

@ -3,7 +3,7 @@
// Definitions by: Eric Byers <https://github.com/EricByers/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ClientOptions {
export interface ClientOptions {
/**
* graphite server host or ip
* Defaults to 127.0.0.1

View File

@ -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<any, any> | null;
@ -66,7 +66,7 @@ interface ConnectionConfig {
connectionFields?: Thunk<GraphQLFieldConfigMap<any, any>> | null;
}
interface GraphQLConnectionDefinitions {
export interface GraphQLConnectionDefinitions {
edgeType: GraphQLObjectType;
connectionType: GraphQLObjectType;
}
@ -107,7 +107,7 @@ export interface Connection<T> {
/**
* A flow type designed to be exposed as a `Edge` over GraphQL.
*/
interface Edge<T> {
export interface Edge<T> {
node: T;
cursor: ConnectionCursor;
}
@ -115,7 +115,7 @@ interface Edge<T> {
/**
* 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<GraphQLInputFieldConfigMap>;
@ -241,12 +241,12 @@ export function mutationWithClientMutationId(
// node/node.js
interface GraphQLNodeDefinitions {
export interface GraphQLNodeDefinitions {
nodeInterface: GraphQLInterfaceType;
nodeField: GraphQLFieldConfig<any, any>;
}
type typeResolverFn = ((any: any) => GraphQLObjectType) |
export type typeResolverFn = ((any: any) => GraphQLObjectType) |
((any: any) => Promise<GraphQLObjectType>);
/**
@ -264,7 +264,7 @@ export function nodeDefinitions<TContext>(
typeResolver?: GraphQLTypeResolver<any, TContext>
): 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;

View File

@ -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<T> extends HalogenCommonProps {
export interface MarginLoaderProps<T> extends HalogenCommonProps {
margin?: T;
size?: T;
}
interface RadiusLoaderProps extends MarginLoaderProps<string> {
export interface RadiusLoaderProps extends MarginLoaderProps<string> {
height?: string;
width?: string;
radius?: string;
@ -34,50 +34,50 @@ interface RadiusLoaderProps extends MarginLoaderProps<string> {
/**
* React components
*/
type PulseLoader = react.Component<MarginLoaderProps<string>, {}>;
export type PulseLoader = react.Component<MarginLoaderProps<string>, {}>;
export const PulseLoader: react.ComponentClass<MarginLoaderProps<string>>;
type RotateLoader = react.Component<MarginLoaderProps<string>, {}>;
export type RotateLoader = react.Component<MarginLoaderProps<string>, {}>;
export const RotateLoader: react.ComponentClass<MarginLoaderProps<string>>;
type BeatLoader = react.Component<MarginLoaderProps<string>, {}>;
export type BeatLoader = react.Component<MarginLoaderProps<string>, {}>;
export const BeatLoader: react.ComponentClass<MarginLoaderProps<string>>;
type RiseLoader = react.Component<MarginLoaderProps<string>, {}>;
export type RiseLoader = react.Component<MarginLoaderProps<string>, {}>;
export const RiseLoader: react.ComponentClass<MarginLoaderProps<string>>;
type SyncLoader = react.Component<MarginLoaderProps<string>, {}>;
export type SyncLoader = react.Component<MarginLoaderProps<string>, {}>;
export const SyncLoader: react.ComponentClass<MarginLoaderProps<string>>;
type GridLoader = react.Component<MarginLoaderProps<string>, {}>;
export type GridLoader = react.Component<MarginLoaderProps<string>, {}>;
export const GridLoader: react.ComponentClass<MarginLoaderProps<string>>;
type ClipLoader = react.Component<SizeLoaderProps, {}>;
export type ClipLoader = react.Component<SizeLoaderProps, {}>;
export const ClipLoader: react.ComponentClass<SizeLoaderProps>;
type SquareLoader = react.Component<SizeLoaderProps, {}>;
export type SquareLoader = react.Component<SizeLoaderProps, {}>;
export const SquareLoader: react.ComponentClass<SizeLoaderProps>;
type DotLoader = react.Component<SizeLoaderProps, {}>;
export type DotLoader = react.Component<SizeLoaderProps, {}>;
export const DotLoader: react.ComponentClass<SizeLoaderProps>;
type PacmanLoader = react.Component<MarginLoaderProps<number>, {}>;
export type PacmanLoader = react.Component<MarginLoaderProps<number>, {}>;
export const PacmanLoader: react.ComponentClass<MarginLoaderProps<number>>;
type MoonLoader = react.Component<SizeLoaderProps, {}>;
export type MoonLoader = react.Component<SizeLoaderProps, {}>;
export const MoonLoader: react.ComponentClass<SizeLoaderProps>;
type RingLoader = react.Component<SizeLoaderProps, {}>;
export type RingLoader = react.Component<SizeLoaderProps, {}>;
export const RingLoader: react.ComponentClass<SizeLoaderProps>;
type BounceLoader = react.Component<SizeLoaderProps, {}>;
export type BounceLoader = react.Component<SizeLoaderProps, {}>;
export const BounceLoader: react.ComponentClass<SizeLoaderProps>;
type SkewLoader = react.Component<SizeLoaderProps, {}>;
export type SkewLoader = react.Component<SizeLoaderProps, {}>;
export const SkewLoader: react.ComponentClass<SizeLoaderProps>;
type FadeLoader = react.Component<RadiusLoaderProps, {}>;
export type FadeLoader = react.Component<RadiusLoaderProps, {}>;
export const FadeLoader: react.ComponentClass<RadiusLoaderProps>;
type ScaleLoader = react.Component<RadiusLoaderProps, {}>;
export type ScaleLoader = react.Component<RadiusLoaderProps, {}>;
export const ScaleLoader: react.ComponentClass<RadiusLoaderProps>;

View File

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

View File

@ -3,7 +3,7 @@
// Definitions by: Prashant Tiwari <https://github.com/prashaantt>
// 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. */

View File

@ -3,7 +3,7 @@
// Definitions by: Jørgen Elgaard Larsen <https://github.com/elhaard/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
type IGroups = any;
export type IGroups = any;
export class ISBNcodes {
readonly source: string;

View File

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

View File

@ -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.
*

View File

@ -10,7 +10,7 @@ import { Component, HTMLProps } from 'react';
/**
* Defines the Link Props contract
*/
interface LinkProps extends HTMLProps<HTMLAnchorElement> {
export interface LinkProps extends HTMLProps<HTMLAnchorElement> {
/**
* Indicates whether Links listen for navigate events
*/
@ -32,7 +32,7 @@ interface LinkProps extends HTMLProps<HTMLAnchorElement> {
/**
* 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<RefreshLinkProps, any> { }
/**
* 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<NavigationLinkProps, any> { }
/**
* 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
*/

View File

@ -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
*/

View File

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

View File

@ -3,7 +3,7 @@
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Device {
export interface Device {
vendorId: number;
productId: number;
path: string;

View File

@ -3,7 +3,7 @@
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
type ElementTarget = string | Element | Element[];
export type ElementTarget = string | Element | Element[];
export interface WavesConfig {
/**

View File

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

View File

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

18
types/pem/index.d.ts vendored
View File

@ -3,7 +3,7 @@
// Definitions by: Anthony Trinh <https://github.com/tony19>, Ruslan Arkhipau <https://github.com/DethAriel>
// 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<T> = (error: any, result: T) => any;
export type Callback<T> = (error: any, result: T) => any;
/**
* Creates a private key

View File

@ -65,7 +65,7 @@ export function tokenize(text: string, grammar: LanguageDefinition): Array<Token
export function fileHighlight(): void;
interface Environment {
export interface Environment {
element?: Element;
language?: LanguageDefinition;
grammar?: any;
@ -79,11 +79,11 @@ interface Environment {
parent?: Element;
}
interface Identifier {
export interface Identifier {
value: number;
}
interface Util {
export interface Util {
/** Encode raw strings in tokens in preparation to display as HTML */
encode(tokens: TokenNode): TokenNode;
@ -97,7 +97,7 @@ interface Util {
clone(o: LanguageDefinition): LanguageDefinition;
}
interface LanguageDefinition {
export interface LanguageDefinition {
keyword?: RegExp | LanguageDefinition;
number?: RegExp | LanguageDefinition;
function?: RegExp | LanguageDefinition;
@ -142,7 +142,7 @@ interface LanguageDefinition {
rest?: Token[];
}
interface Languages {
export interface Languages {
/** Get a defined language's definition */
[key: string]: LanguageDefinition;
@ -165,8 +165,8 @@ interface Languages {
insertBefore(inside: string, before: string, insert: LanguageDefinition, root: LanguageDefinition): any;
}
type HookCallback = (env: Environment) => 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<Array<(env: Environment) => 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<Token | string>;
export type TokenNode = Token | string | Array<Token | string>;
export class Token {
/**

View File

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

View File

@ -6,7 +6,7 @@
import * as React from "react";
interface EventOptions {
export interface EventOptions {
/**
* @default false
*/

View File

@ -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 []
*/

View File

@ -10,14 +10,14 @@ import * as React from 'react';
// All events need to be lowercase so they don't collide with React.DOMAttributes<T>
// 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<Map>,
export interface MapProps extends React.HTMLProps<Map>,
LeafletLayerEvents, LeafletMapStateChangeEvents, LeafletPopupEvents, LeafletTooltipEvents, LeafletLocationEvents, LeafletInteractionEvents, LeafletOtherEvents, Leaflet.MapOptions {
animate?: boolean;
bounds?: Leaflet.LatLngBoundsExpression;
@ -77,13 +77,13 @@ interface MapProps extends React.HTMLProps<Map>,
id?: string;
}
type Map = React.ComponentClass<MapProps>;
export type Map = React.ComponentClass<MapProps>;
export const Map: Map;
interface MapInstance extends React.Component<MapProps, {}> {
export interface MapInstance extends React.Component<MapProps, {}> {
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<PaneProps>;
// 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<MarkerProps>;
interface MarkerInstance extends React.Component<MarkerProps, {}> {
export interface MarkerInstance extends React.Component<MarkerProps, {}> {
leafletElement: Leaflet.Marker;
}
interface PopupProps extends LayerProps, Leaflet.PopupOptions {
export interface PopupProps extends LayerProps, Leaflet.PopupOptions {
position?: Leaflet.LatLngExpression;
}
export const Popup: React.ComponentClass<PopupProps>;
// 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<TooltipProps>;
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<GridLayerProps>;
interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions {
export interface TileLayerProps extends GridLayerProps, Leaflet.TileLayerOptions {
url: string;
}
export const TileLayer: React.ComponentClass<TileLayerProps>;
interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents {
export interface ImageOverlayProps extends LayerProps, LeafletInteractionEvents {
url: string;
opacity?: string;
}
export const ImageOverlay: React.ComponentClass<ImageOverlayProps>;
interface WMSTileLayerProps extends TileLayerProps {
export interface WMSTileLayerProps extends TileLayerProps {
url: string;
}
export const WMSTileLayer: React.ComponentClass<WMSTileLayerProps>;
// 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<CircleProps>;
interface CircleMarkerProps extends PathProps {
export interface CircleMarkerProps extends PathProps {
center: Leaflet.LatLngExpression;
radius?: number;
}
export const CircleMarker: React.ComponentClass<CircleMarkerProps>;
interface PolylineProps extends PathProps {
export interface PolylineProps extends PathProps {
positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][];
}
export const Polyline: React.ComponentClass<PolylineProps>;
interface PolygonProps extends PathProps {
export interface PolygonProps extends PathProps {
positions: Leaflet.LatLngExpression[] | Leaflet.LatLngExpression[][] | Leaflet.LatLngExpression[][][];
}
export const Polygon: React.ComponentClass<PolygonProps>;
interface RectangleProps extends PathProps {
export interface RectangleProps extends PathProps {
bounds: Leaflet.LatLngBoundsExpression;
}
export const Rectangle: React.ComponentClass<RectangleProps>;
// tslint:disable-next-line:no-empty-interface
interface LayerGroupProps extends LayerProps { }
export interface LayerGroupProps extends LayerProps { }
export const LayerGroup: React.ComponentClass<LayerGroupProps>;
// 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<FeatureGroupProps>;
interface GeoJSONProps extends FeatureGroupProps, Leaflet.GeoJSONOptions {
export interface GeoJSONProps extends FeatureGroupProps, Leaflet.GeoJSONOptions {
data: GeoJSON.GeoJsonObject;
}
export const GeoJSON: React.ComponentClass<GeoJSONProps>;
interface AttributionControlProps {
export interface AttributionControlProps {
position?: Leaflet.ControlPosition;
}
export const AttributionControl: React.ComponentClass<AttributionControlProps>;
interface LayersControlProps {
export interface LayersControlProps {
position?: Leaflet.ControlPosition;
}
export const LayersControl: React.ComponentClass<LayersControlProps> & { BaseLayer: LayersControl.BaseLayer, Overlay: LayersControl.Overlay };
@ -218,19 +217,19 @@ export namespace LayersControl {
type Overlay = React.ComponentClass<LayersControlLayerProps>;
}
interface MapControlProps {
export interface MapControlProps {
position?: Leaflet.ControlPosition;
}
export class MapControl<T extends MapControlProps> extends React.Component<T, any> {
leafletElement?: L.Control;
}
interface ScaleControlProps {
export interface ScaleControlProps {
position: Leaflet.ControlPosition;
}
export const ScaleControl: React.ComponentClass<ScaleControlProps>;
interface ZoomControlProps {
export interface ZoomControlProps {
position: Leaflet.ControlPosition;
}
export const ZoomControl: React.ComponentClass<ZoomControlProps>;

View File

@ -6,7 +6,7 @@
/// <reference types="react-native" />
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<Result> {
export interface JobReturnValue<Result> {
jobId: number;
promise: Promise<Result>;
}

View File

@ -170,7 +170,7 @@ export class GoogleAnalyticsTracker {
setSamplingRate(sampleRatio: number): void;
}
interface GAEvent<T> {
export interface GAEvent<T> {
event: string;
payload: T;
}

View File

@ -34,7 +34,7 @@ export interface renderTabBarProperties {
containerWidth: number;
}
interface ScrollableTabViewProperties extends React.Props<ScrollableTabView> {
export interface ScrollableTabViewProperties extends React.Props<ScrollableTabView> {
/**
* tabBarPosition (String) Defaults to "top".
* "bottom" to position the tab bar below content.

View File

@ -9,7 +9,7 @@ import {
ViewStyle
} from 'react-native';
interface SwiperProperties extends React.Props<Swiper> {
export interface SwiperProperties extends React.Props<Swiper> {
horizontal?: boolean;
style?: ViewStyle;

View File

@ -9,7 +9,7 @@ import * as React from "react";
export { Modal, Overlay, Portal, Position } from "react-bootstrap";
// <Affix />
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<AffixProps, {}> { }
// <AutoAffix />
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<AutoAffixProps, {}> { }
// <Transition />
interface TransitionProps {
export interface TransitionProps {
className?: string;
/**

View File

@ -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<string | ReactTestRendererJSON>;
$$typeof?: any;
}
interface TestRendererOptions {
export interface TestRendererOptions {
createNodeMock(element: ReactElement<any>): any;
}
// https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155

View File

@ -6,12 +6,12 @@
import { Component, HTMLAttributes, ReactNode } from "react";
interface ToggleIcons {
export interface ToggleIcons {
checked?: ReactNode;
unchecked?: ReactNode;
}
interface ToggleProps extends HTMLAttributes<any> {
export interface ToggleProps extends HTMLAttributes<any> {
"aria-labelledby"?: string;
"aria-label"?: string;
icons?: boolean | ToggleIcons;

View File

@ -115,11 +115,11 @@ export class Masonry extends PureComponent<MasonryProps, MasonryState> {
render(): JSX.Element;
}
type emptyObject = {}
export type emptyObject = {}
type identity = <T>(value: T) => T;
export type identity = <T>(value: T) => T;
type noop = () => void;
export type noop = () => void;
export type Position = {
left: number,

View File

@ -202,7 +202,7 @@ export const defaultTableHeaderRenderer: () => Array<React.ReactElement<TableHea
export const defaultTableHeaderRowRenderer: TableHeaderRowRenderer;
export const defaultTableRowRenderer: TableRowRenderer;
type SortDirectionStatic = {
export type SortDirectionStatic = {
/**
* Sort items in ascending order.
* This means arranging from the lowest value to the highest (e.g. a-z, 0-9).

View File

@ -3,9 +3,9 @@
// Definitions by: Tristan Jones <https://github.com/jonestristand>
// 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;

View File

@ -11,31 +11,31 @@ import * as Redux from 'redux';
export as namespace ReduxAction;
interface BaseAction {
export interface BaseAction {
type: string;
}
interface Action<Payload> extends BaseAction {
export interface Action<Payload> extends BaseAction {
payload: Payload;
}
interface MetaAction<Payload, Meta> extends Action<Payload> {
export interface MetaAction<Payload, Meta> extends Action<Payload> {
meta: Meta;
}
type ThunkAction<Payload> = (dispatch: Redux.Dispatch<any>, getState: () => any) => Promise<Action<Payload>>;
type ThunkMetaAction<Payload, Meta> = (dispatch: Redux.Dispatch<any>, getState: () => any) => Promise<MetaAction<Payload, Meta>>;
export type ThunkAction<Payload> = (dispatch: Redux.Dispatch<any>, getState: () => any) => Promise<Action<Payload>>;
export type ThunkMetaAction<Payload, Meta> = (dispatch: Redux.Dispatch<any>, getState: () => any) => Promise<MetaAction<Payload, Meta>>;
/** argument inferring borrowed from redux-actions definitions */
type ActionFunction0<R> = () => R;
type ActionFunction1<T1, R> = (t1: T1) => R;
type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R;
type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
type ActionFunctionAny<R> = (...args: any[]) => R;
export type ActionFunction0<R> = () => R;
export type ActionFunction1<T1, R> = (t1: T1) => R;
export type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R;
export type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
export type ActionFunctionAny<R> = (...args: any[]) => R;
type ReducerHandler<State> = <A extends BaseAction, S extends State>(payload: any, state?: State, action?: A) => S;
export type ReducerHandler<State> = <A extends BaseAction, S extends State>(payload: any, state?: State, action?: A) => S;
interface ReducerHandlers<State> {
export interface ReducerHandlers<State> {
[type: string]: ReducerHandler<State>;
}

View File

@ -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<Payload> extends BaseAction {
export interface Action<Payload> extends BaseAction {
payload?: Payload;
error?: boolean;
}
interface ActionMeta<Payload, Meta> extends Action<Payload> {
export interface ActionMeta<Payload, Meta> extends Action<Payload> {
meta: Meta;
}
interface ReducerMap<State, Payload> {
export interface ReducerMap<State, Payload> {
[actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>;
}
interface ReducerMapMeta<State, Payload, Meta> {
export interface ReducerMapMeta<State, Payload, Meta> {
[actionType: string]: Reducer<State, Payload> | ReducerNextThrow<State, Payload>;
}
interface ReducerNextThrow<State, Payload> {
export interface ReducerNextThrow<State, Payload> {
next?(state: State, action: Action<Payload>): State;
throw?(state: State, action: Action<Payload>): State;
}
interface ReducerNextThrowMeta<State, Payload, Meta> {
export interface ReducerNextThrowMeta<State, Payload, Meta> {
next?(state: State, action: ActionMeta<Payload, Meta>): State;
throw?(state: State, action: ActionMeta<Payload, Meta>): State;
}
type ActionFunctions<Payload> =
export type ActionFunctions<Payload> =
ActionFunction0<Action<Payload>> |
ActionFunction1<any, Action<Payload>> |
ActionFunction2<any, any, Action<Payload>> |
@ -46,17 +46,17 @@ type ActionFunctions<Payload> =
ActionFunction4<any, any, any, any, Action<Payload>> |
ActionFunctionAny<Action<Payload>>;
type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State;
export type Reducer<State, Payload> = (state: State, action: Action<Payload>) => State;
type ReducerMeta<State, Payload, Meta> = (state: State, action: ActionMeta<Payload, Meta>) => State;
export type ReducerMeta<State, Payload, Meta> = (state: State, action: ActionMeta<Payload, Meta>) => State;
/** argument inferring borrowed from lodash definitions */
type ActionFunction0<R> = () => R;
type ActionFunction1<T1, R> = (t1: T1) => R;
type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R;
type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
type ActionFunction4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
type ActionFunctionAny<R> = (...args: any[]) => R;
export type ActionFunction0<R> = () => R;
export type ActionFunction1<T1, R> = (t1: T1) => R;
export type ActionFunction2<T1, T2, R> = (t1: T1, t2: T2) => R;
export type ActionFunction3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
export type ActionFunction4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
export type ActionFunctionAny<R> = (...args: any[]) => R;
export function createAction<Payload>(
actionType: string,

View File

@ -8,9 +8,9 @@ import { ComponentClass, StatelessComponent, ReactType } from "react";
import { Action } from "redux";
import { Location } from "history";
type ComponentConstructor<P> = ComponentClass<P> | StatelessComponent<P>;
export type ComponentConstructor<P> = ComponentClass<P> | StatelessComponent<P>;
interface InjectedProps<AuthData> {
export interface InjectedProps<AuthData> {
authData?: AuthData;
}
@ -28,6 +28,6 @@ export interface AuthWrapperConfig<State, Props, AuthData> {
redirectAction?(...args: any[]): Action;
}
type AuthDecorator<Props> = (component: ComponentConstructor<Props>) => ComponentClass<Props>;
export type AuthDecorator<Props> = (component: ComponentConstructor<Props>) => ComponentClass<Props>;
export function UserAuthWrapper<State, Props, AuthData>(config: AuthWrapperConfig<State, Props, AuthData>): AuthDecorator<Props>;

View File

@ -5,7 +5,7 @@
import { StorageAdapter } from "redux-localstorage";
interface DebounceOptions {
export interface DebounceOptions {
maxWait?: number;
[key: string]: any;
}

View File

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

View File

@ -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
*/

View File

@ -25,7 +25,7 @@ export interface Config {
message?: string;
}
interface Multiple {
export interface Multiple {
multiple?: boolean;
}

View File

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

View File

@ -1511,17 +1511,17 @@ export namespace until {
function urlMatches(regex: RegExp): Condition<boolean>;
}
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<Alert> {
* 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<string>;
}
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<!webdriver.IWebDriver>}
* @interface
*/
interface ThenableWebDriver extends WebDriver, promise.IThenable<WebDriver> { }
/**
* 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<!webdriver.IWebDriver>}
* @interface
*/
export interface ThenableWebDriver extends WebDriver, promise.IThenable<WebDriver> { }
interface IWebElementId {
export interface IWebElementId {
[ELEMENT: string]: string;
}
@ -4150,7 +4150,7 @@ interface IWebElementId {
* });
* </code></pre>
*/
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<T> {
export interface Serializable<T> {
/**
* Returns either this instance's serialized represention, if immediately
* available, or a promise for its serialized representation. This function is

View File

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

View File

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

View File

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

View File

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

View File

@ -68,7 +68,7 @@ export interface ScrollbarTargets {
};
}
interface ScrollIntoViewOptions {
export interface ScrollIntoViewOptions {
/**
* scrolling stop offset to top edge of container
* @default 0

View File

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

View File

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

View File

@ -81,7 +81,7 @@ export class InterfaceDescriptor {
extra: Buffer;
}
interface Endpoint {
export interface Endpoint {
direction: string;
transferType: number;
timeout: number;

View File

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

123
types/vis/index.d.ts vendored
View File

@ -8,15 +8,15 @@
// Matthieu Maitre <https://github.com/mmaitre314>
// 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<DataGroup>) => 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<DataGroup>) => 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<T extends DataItem | DataGroup | Node | Edge> {
*
* @interface DataSelectionOptions
*/
interface DataSelectionOptions<T> {
export interface DataSelectionOptions<T> {
/**
* 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<T extends DataItem | DataGroup> {
constructor(items: T[]);
}
type DataItemCollectionType = DataItem[] | DataSet<DataItem> | DataView<DataItem>;
type DataGroupCollectionType = DataGroup[] | DataSet<DataGroup> | DataView<DataGroup>;
export type DataItemCollectionType = DataItem[] | DataSet<DataItem> | DataView<DataItem>;
export type DataGroupCollectionType = DataGroup[] | DataSet<DataGroup> | DataView<DataGroup>;
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' |

View File

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