Skip to content

Instantly share code, notes, and snippets.

@treshugart
Created May 10, 2017 17:52
Show Gist options
  • Save treshugart/9bbbba9d524dd75eb2ccf6b4b21df706 to your computer and use it in GitHub Desktop.
Save treshugart/9bbbba9d524dd75eb2ccf6b4b21df706 to your computer and use it in GitHub Desktop.

Flow / TypeScript definition files

These are the definition files generated from the SkateJS source, written in Flow, for both Flow and TypeScript.

declare module "skatejs" {
type PropOptionsAttributeBase = boolean | string;
type PropOptionsAttribute = PropOptionsAttributeBase | {
source?: Boolean | String,
_target0?: Boolean | String
};
interface PropOptions {
attribute?: PropOptionsAttribute | Boolean,
coerce?: _Function1,
_default0?: any,
deserialize?: _Function1,
serialize?: _Function1
}
var _HTMLElement5: _Class3<_HTMLElement5>;
var _HTMLElement4: _HTMLElement5;
var _HTMLElement3: _HTMLElement5;
var string: PropOptions;
var object: PropOptions;
var number: PropOptions;
var boolean: PropOptions;
var array: PropOptions;
var _HTMLElement2: _HTMLElement5;
var _HTMLElement1: _HTMLElement5;
var _HTMLElement0: _HTMLElement5;
interface EventOptions {
bubbles: boolean,
cancelable: boolean,
composed: boolean,
detail?: any
}
var HTMLElement: _HTMLElement5;
var withUnique: (_Base2: _Class2<_HTMLElement4>) => _Class2<_HTMLElement4>;
var withRender: (_Base1: _Class1<_HTMLElement3>) => _Class1<_HTMLElement3>;
var props: {
array: typeof array,
boolean: typeof boolean,
number: typeof number,
object: typeof object,
string: typeof string
};
var withProps: (_Base0: _Class0<_HTMLElement2>) => _Class0<_HTMLElement2>;
import type {h} from "preact";
var Component: _HTMLElement1;
var withComponent: (Base: Class<_HTMLElement1>) => Class<_HTMLElement1>;
function link(_elem0: _HTMLElement0, target: string): _Function0;
function emit(elem: HTMLElement, name: string, opts: EventOptions): boolean;
function define(Ctor: Function): Function;
export {
withUnique
}
export {
withRender
}
export {
withProps,
props
}
export {
withComponent,
Component,
h
}
export {
link
}
export {
emit
}
// @flow
export {
define
}
}
declare module "skatejs" {
declare type PropOptionsAttributeBase = boolean | string;
declare type PropOptionsAttribute = PropOptionsAttributeBase | {
source?: Boolean | String,
_target0?: Boolean | String
};
declare interface PropOptions {
attribute?: PropOptionsAttribute | Boolean,
coerce?: _Function1,
_default0?: any,
deserialize?: _Function1,
serialize?: _Function1
}
declare var _HTMLElement5: _Class3<_HTMLElement5>;
declare var _HTMLElement4: _HTMLElement5;
declare var _HTMLElement3: _HTMLElement5;
declare var string: PropOptions;
declare var object: PropOptions;
declare var number: PropOptions;
declare var boolean: PropOptions;
declare var array: PropOptions;
declare var _HTMLElement2: _HTMLElement5;
declare var _HTMLElement1: _HTMLElement5;
declare var _HTMLElement0: _HTMLElement5;
declare interface EventOptions {
bubbles: boolean,
cancelable: boolean,
composed: boolean,
detail?: any
}
declare var HTMLElement: _HTMLElement5;
declare var withUnique: (_Base2: _Class2<_HTMLElement4>) => _Class2<_HTMLElement4>;
declare var withRender: (_Base1: _Class1<_HTMLElement3>) => _Class1<_HTMLElement3>;
declare var props: {
array: typeof array,
boolean: typeof boolean,
number: typeof number,
object: typeof object,
string: typeof string
};
declare var withProps: (_Base0: _Class0<_HTMLElement2>) => _Class0<_HTMLElement2>;
import type {h} from "preact";
declare var Component: _HTMLElement1;
declare var withComponent: (Base: Class<_HTMLElement1>) => Class<_HTMLElement1>;
declare function link(_elem0: _HTMLElement0, target: string): _Function0;
declare function emit(elem: HTMLElement, name: string, opts: EventOptions): boolean;
declare function define(Ctor: Function): Function;
declare export {
withUnique
}
declare export {
withRender
}
declare export {
withProps,
props
}
declare export {
withComponent,
Component,
h
}
declare export {
link
}
declare export {
emit
}
// @flow
declare export {
define
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment