From 70ba063fd3d67987686c447204a1abd377318570 Mon Sep 17 00:00:00 2001 From: Jason Wu Date: Sat, 1 Jul 2017 12:11:52 -0500 Subject: [PATCH 01/14] Added type definitions for draggabilly --- types/draggabilly/draggabilly-tests.ts | 46 ++++++++++++++++++++++++++ types/draggabilly/index.d.ts | 42 +++++++++++++++++++++++ types/draggabilly/tsconfig.json | 23 +++++++++++++ types/draggabilly/tslint.json | 1 + 4 files changed, 112 insertions(+) create mode 100644 types/draggabilly/draggabilly-tests.ts create mode 100644 types/draggabilly/index.d.ts create mode 100644 types/draggabilly/tsconfig.json create mode 100644 types/draggabilly/tslint.json diff --git a/types/draggabilly/draggabilly-tests.ts b/types/draggabilly/draggabilly-tests.ts new file mode 100644 index 0000000000..6ab38e6c13 --- /dev/null +++ b/types/draggabilly/draggabilly-tests.ts @@ -0,0 +1,46 @@ +import Draggabilly from 'draggabilly'; + +const elem = document.querySelector('.draggable') as Element; + +const draggieA = new Draggabilly('.test'); +const draggieB = new Draggabilly(elem); + +const draggie = new Draggabilly(elem, { + axis: 'x', + containment: true, + grid: [20, 20], + handle: '.handle' +}); + +const draggiePosX: number = draggie.position.x; +const draggiePosY: number = draggie.position.y; + +draggie.on( 'dragMove', (event, pointer, moveVector) => { + const pointerPageX: number = pointer.pageX; + const pointePageY: number = pointer.pageY; + + const moveVectorX: number = moveVector.x; + const moveVectorY: number = moveVector.y; +}); + +draggie.on( 'dragStart', (event, pointer) => {}); + +draggie.on( 'dragEnd', (event, pointer) => {}); + +draggie.on( 'pointerDown', (event, pointer) => {}); + +draggie.on( 'pointerMove', (event, pointer, moveVector) => {}); + +draggie.on( 'pointerUp', (event, pointer) => {}); + +draggie.on( 'staticClick', (event, pointer) => {}); + +draggie.off('dragMove', (event, pointer, moveVector) => {}); + +draggie.once('dragMove', (event, pointer, moveVector) => {}); + +draggie.enable(); + +draggie.disable(); + +draggie.destroy(); diff --git a/types/draggabilly/index.d.ts b/types/draggabilly/index.d.ts new file mode 100644 index 0000000000..3bc3e3a10e --- /dev/null +++ b/types/draggabilly/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for draggabilly 2.1 +// Project: http://draggabilly.desandro.com/ +// Definitions by: Jason Wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'draggabilly' { + interface Position { + x: number; + y: number; + } + + export interface DraggabillyOptions { + axis?: 'x' | 'y'; + containment?: Element | string | boolean; + grid?: [number, number]; + handle?: string; + } + + export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp' + | 'staticClick'; + + export default class Draggabilly { + position: Position; + + constructor(element: Element | string, options?: DraggabillyOptions); + + on(eventName: DraggabillyEventName, + listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void; + + off(eventName: DraggabillyEventName, + listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void; + + once(eventName: DraggabillyEventName, + listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): void; + + enable(): void; + + disable(): void; + + destroy(): void; + } +} diff --git a/types/draggabilly/tsconfig.json b/types/draggabilly/tsconfig.json new file mode 100644 index 0000000000..32cc6ee235 --- /dev/null +++ b/types/draggabilly/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "draggabilly-tests.ts" + ] +} diff --git a/types/draggabilly/tslint.json b/types/draggabilly/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/draggabilly/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e076754cc7dd747e80d961510923b18ddf1e9c4d Mon Sep 17 00:00:00 2001 From: Jason Wu Date: Sat, 1 Jul 2017 12:46:13 -0500 Subject: [PATCH 02/14] Added TypeScript version --- types/draggabilly/index.d.ts | 8 ++++++-- types/draggabilly/tsconfig.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/types/draggabilly/index.d.ts b/types/draggabilly/index.d.ts index 3bc3e3a10e..c614796ca9 100644 --- a/types/draggabilly/index.d.ts +++ b/types/draggabilly/index.d.ts @@ -2,10 +2,14 @@ // Project: http://draggabilly.desandro.com/ // Definitions by: Jason Wu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// export = Backbone; +// export as namespace Backbone; declare module 'draggabilly' { - interface Position { - x: number; + interface Position { + x: number; y: number; } diff --git a/types/draggabilly/tsconfig.json b/types/draggabilly/tsconfig.json index 32cc6ee235..c0873c7293 100644 --- a/types/draggabilly/tsconfig.json +++ b/types/draggabilly/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, + "strictNullChecks": false, "baseUrl": "../", "typeRoots": [ "../" From 3d3e779a3295beaa7bce84f39ab7d8bdc4bd6bbc Mon Sep 17 00:00:00 2001 From: mmkal Date: Sat, 1 Jul 2017 14:15:26 -0400 Subject: [PATCH 03/14] feat: use typescript type indexing to make find* functions more helpful. This turns WhereOptions and FindOptions into generic types, which can then check that you are using the correct column names, in the find* functions (findOne, findAll etc.). In other places where there is no attributes type available, fall back to the old behaviour of allowing any field names (now with types named AnyWhereOptions and AnyFindOptions). This allows typescript to catch more errors, e.g. User.findOne({ where: { firstName: 'Bob' } }); vs. User.findOne({ where: { first_name: 'Bob' } }); --- types/sequelize/index.d.ts | 102 ++++++++++++++++------------- types/sequelize/sequelize-tests.ts | 60 +++++++++++++---- 2 files changed, 103 insertions(+), 59 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 86ecb00809..8d0a379bbe 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -10,7 +10,6 @@ import * as _ from "lodash"; -import * as Promise from "bluebird"; declare namespace sequelize { @@ -259,7 +258,7 @@ declare namespace sequelize { /** * An optional where clause to limit the associated models. */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Apply a scope on the related model, or remove its default scope by passing false. @@ -346,7 +345,7 @@ declare namespace sequelize { */ ( newAssociations?: Array, - options?: HasManySetAssociationsMixinOptions | FindOptions | InstanceUpdateOptions + options?: HasManySetAssociationsMixinOptions | AnyFindOptions | InstanceUpdateOptions ): Promise; } @@ -672,7 +671,7 @@ declare namespace sequelize { /** * An optional where clause to limit the associated models. */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Apply a scope on the related model, or remove its default scope by passing false. @@ -722,7 +721,7 @@ declare namespace sequelize { /** * An optional where clause to limit the associated models. */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Apply a scope on the related model, or remove its default scope by passing false. @@ -809,7 +808,7 @@ declare namespace sequelize { */ ( newAssociations?: Array, - options?: BelongsToManySetAssociationsMixinOptions | FindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } + options?: BelongsToManySetAssociationsMixinOptions | AnyFindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } ): Promise; } @@ -858,7 +857,7 @@ declare namespace sequelize { */ ( newAssociations?: Array, - options?: BelongsToManyAddAssociationsMixinOptions | FindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } + options?: BelongsToManyAddAssociationsMixinOptions | AnyFindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } ): Promise; } @@ -907,7 +906,7 @@ declare namespace sequelize { */ ( newAssociation?: TInstance | TInstancePrimaryKey, - options?: BelongsToManyAddAssociationMixinOptions | FindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } + options?: BelongsToManyAddAssociationMixinOptions | AnyFindOptions | BulkCreateOptions | InstanceUpdateOptions | InstanceDestroyOptions | { through: TJoinTableAttributes } ): Promise; } @@ -1135,7 +1134,7 @@ declare namespace sequelize { /** * An optional where clause to limit the associated models. */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Apply a scope on the related model, or remove its default scope by passing false. @@ -2613,7 +2612,7 @@ declare namespace sequelize { /** * A hash of attributes to describe your search. See above for examples. */ - where?: WhereOptions | Array; + where?: AnyWhereOptions | Array; } @@ -2663,7 +2662,7 @@ declare namespace sequelize { /** * A hash of attributes to describe your search. See above for examples. */ - where?: WhereOptions | Array; + where?: AnyWhereOptions | Array; } @@ -2824,7 +2823,7 @@ declare namespace sequelize { * return a new instance. With this method, all references to the Instance are updated with the new data * and no new objects are created. */ - reload(options?: FindOptions): Promise; + reload(options?: AnyFindOptions): Promise; /** * Validate the attribute of this instance according to validation rules set in the model definition. @@ -3031,8 +3030,8 @@ declare namespace sequelize { * Where Complex nested query */ interface WhereNested { - $and: Array; - $or: Array; + $and: Array; + $or: Array; } /** @@ -3054,10 +3053,10 @@ declare namespace sequelize { /** * Logic of where statement */ - interface WhereLogic { + type WhereLogic = Partial<{ $ne: string | number | WhereLogic; $in: Array | literal; - $not: boolean | string | number | WhereOptions; + $not: boolean | string | number | AnyWhereOptions; $notIn: Array | literal; $gte: number | string | Date; $gt: number | string | Date; @@ -3078,7 +3077,7 @@ declare namespace sequelize { "@>": any; $contained: any; "<@": any; - } + }>; /** * A hash of attributes to describe your search. See above for examples. @@ -3086,8 +3085,15 @@ declare namespace sequelize { * We did put Object in the end, because there where query might be a JSON Blob. It cripples a bit the * typesafety, but there is no way to pass the tests if we just remove it. */ - interface WhereOptions { - [field: string]: string | number | WhereLogic | WhereOptions | col | and | or | WhereGeometryOptions | Array | Object | null; + type WhereOptions = { + [P in keyof T]?: string | number | WhereLogic | WhereOptions | col | and | or | WhereGeometryOptions | Array | null; + }; + + /** + * A hash of attributes to describe your search, accepting any field names. See `WhereOptions` for details. + */ + interface AnyWhereOptions { + [field: string]: WhereOptions[] | Object; } /** @@ -3098,7 +3104,7 @@ declare namespace sequelize { /** * Filter on the join model for belongsToMany relations */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * A list of attributes to select from the join model for belongsToMany relations @@ -3141,7 +3147,7 @@ declare namespace sequelize { * Where clauses to apply to the child models. Note that this converts the eager load to an inner join, * unless you explicitly set `required: false` */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * A list of attributes to select from the child model @@ -3183,12 +3189,12 @@ declare namespace sequelize { * * A hash of options to describe the scope of the search */ - interface FindOptions extends LoggingOptions, SearchPathOptions { + interface FindOptions extends LoggingOptions, SearchPathOptions { /** * A hash of attributes to describe your search. See above for examples. */ - where?: WhereOptions | fn | Array; + where?: WhereOptions | fn | Array; /** * A list of the attributes that you want to select. To rename an attribute, you can pass an array, with @@ -3245,7 +3251,7 @@ declare namespace sequelize { /** * having ?!? */ - having?: WhereOptions; + having?: AnyWhereOptions; /** * Group by. It is not mentioned in sequelize's JSDoc, but mentioned in docs. @@ -3265,6 +3271,8 @@ declare namespace sequelize { subQuery?: boolean; } + type AnyFindOptions = FindOptions; + /** * Options for Model.count method */ @@ -3273,7 +3281,7 @@ declare namespace sequelize { /** * A hash of search attributes. */ - where?: WhereOptions | string[]; + where?: AnyWhereOptions | string[]; /** * Include options. See `find` for details @@ -3335,7 +3343,7 @@ declare namespace sequelize { /** * Options for Model.findOrInitialize method */ - interface FindOrInitializeOptions extends FindOptions { + interface FindOrInitializeOptions extends AnyFindOptions { /** * Default values to use if building a new instance @@ -3347,7 +3355,7 @@ declare namespace sequelize { /** * Options for Model.findOrInitialize method */ - interface FindCreateFindOptions extends FindOptions { + interface FindCreateFindOptions extends FindOptions { /** * Default values to use if building a new instance @@ -3423,7 +3431,7 @@ declare namespace sequelize { /** * Filter the destroy */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Run before / after bulk destroy hooks? @@ -3462,7 +3470,7 @@ declare namespace sequelize { /** * Filter the restore */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * Run before / after bulk restore hooks? @@ -3495,7 +3503,7 @@ declare namespace sequelize { /** * Options to describe the scope of the search. */ - where: WhereOptions; + where: AnyWhereOptions; /** * Run before / after bulk update hooks? @@ -3543,7 +3551,7 @@ declare namespace sequelize { /** * A hash of search attributes. */ - where?: WhereOptions; + where?: AnyWhereOptions; /** * The type of the result. If `field` is a field in this Model, the default will be the type of that field, @@ -3634,7 +3642,7 @@ declare namespace sequelize { * @param {Object} [options] * @param {Boolean} [options.override=false] */ - addScope(name: string, scope: FindOptions | Function, options?: AddScopeOptions): void; + addScope(name: string, scope: AnyFindOptions | Function, options?: AddScopeOptions): void; /** * Add a new scope to the model. This is especially useful for adding scopes with includes, when the model you want to include is not available at the time this model is defined. @@ -3646,7 +3654,7 @@ declare namespace sequelize { * @param {Object} [options] * @param {Boolean} [options.override=false] */ - addScope(name: string, scope: FindOptions | Function, options?: AddScopeOptions): void; + addScope(name: string, scope: AnyFindOptions | Function, options?: AddScopeOptions): void; /** * Apply a scope created in `define` to the model. First let's look at how to create scopes: @@ -3695,7 +3703,7 @@ declare namespace sequelize { * @return Model A reference to the model, with the scope(s) applied. Calling scope again on the returned * model will clear the previous scope. */ - scope(options?: string | ScopeOptions | WhereOptions | Array): this; + scope(options?: string | ScopeOptions | AnyWhereOptions | Array): this; /** * Search for multiple instances. @@ -3759,22 +3767,22 @@ declare namespace sequelize { * * @see {Sequelize#query} */ - findAll(options?: FindOptions): Promise; - all(optionz?: FindOptions): Promise; + findAll(options?: FindOptions): Promise; + all(optionz?: FindOptions): Promise; /** * Search for a single instance by its primary key. This applies LIMIT 1, so the listener will * always be called with a single instance. */ - findById(identifier?: number | string, options?: FindOptions): Promise; - findByPrimary(identifier?: number | string, options?: FindOptions): Promise; + findById(identifier?: number | string, options?: FindOptions): Promise; + findByPrimary(identifier?: number | string, options?: FindOptions): Promise; /** * Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single * instance. */ - findOne(options?: FindOptions): Promise; - find(options?: FindOptions): Promise; + findOne(options?: FindOptions): Promise; + find(options?: FindOptions): Promise; /** * Run an aggregation method on the specified field @@ -3829,8 +3837,8 @@ declare namespace sequelize { * without * profiles will be counted */ - findAndCount(options?: FindOptions): Promise<{ rows: TInstance[], count: number }>; - findAndCountAll(options?: FindOptions): Promise<{ rows: TInstance[], count: number }>; + findAndCount(options?: FindOptions): Promise<{ rows: TInstance[], count: number }>; + findAndCountAll(options?: FindOptions): Promise<{ rows: TInstance[], count: number }>; /** * Find the maximum value of field @@ -3886,7 +3894,7 @@ declare namespace sequelize { * A more performant findOrCreate that will not work under a transaction (at least not in postgres) * Will execute a find call, if empty then attempt to create, if unique constraint then attempt to find again */ - findCreateFind(options: FindCreateFindOptions): Promise; + findCreateFind(options: FindCreateFindOptions): Promise; /** * Insert or update a single row. An update will be executed if a row which matches the supplied values on @@ -3994,7 +4002,7 @@ declare namespace sequelize { interface AddCheckConstraintOptions { type: 'check'; name?: string; - where?: WhereOptions; + where?: AnyWhereOptions; } interface AddPrimaryKeyConstraintOptions { @@ -4850,7 +4858,7 @@ declare namespace sequelize { /** * Condition for partioal index */ - where?: WhereOptions; + where?: AnyWhereOptions; } @@ -4901,7 +4909,7 @@ declare namespace sequelize { /** * Name of the scope and it's query */ - [scopeName: string]: FindOptions | Function; + [scopeName: string]: AnyFindOptions | Function; } @@ -4916,7 +4924,7 @@ declare namespace sequelize { * Define the default search scope to use for this model. Scopes have the same form as the options passed to * find / findAll. */ - defaultScope?: FindOptions; + defaultScope?: AnyFindOptions; /** * More scopes, defined in the same way as defaultScope above. See `Model.scope` for more information about diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index d786dfc4a2..3f8001f4f1 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -983,7 +983,7 @@ User.create( { title : 'Chair', creator : { first_name : 'Matt', last_name : 'Ha User.create( { id : 1, title : 'e', Tags : [{ id : 1, name : 'c' }, { id : 2, name : 'd' }] }, { include : [User] } ); User.create( { id : 'My own ID!' } ).then( ( i ) => i.isNewRecord ); -let findOrRetVal: Bluebird<[AnyInstance, boolean]>; +let findOrRetVal: Promise<[AnyInstance, boolean]>; findOrRetVal = User.findOrInitialize( { where : { username : 'foo' } } ); findOrRetVal = User.findOrInitialize( { where : { username : 'foo' }, transaction : t } ); findOrRetVal = User.findOrInitialize( { where : { username : 'foo' }, defaults : { foo : 'asd' }, transaction : t } ); @@ -1318,7 +1318,7 @@ s.define( 'ProductWithSettersAndGetters1', { get : function() { return 'answer = ' + this.getDataValue( 'price' ); }, - set : function( v ) { + set : function( v: number ) { return this.setDataValue( 'price', v + 42 ); } } @@ -1437,6 +1437,37 @@ s.define( 'ScopeMe', { } } ); +// Generic find options +interface ChairAttributes { + id: number; + color: string; + legs: number; +} +interface ChairInstance extends Sequelize.Instance {} + +const Chair = s.define('chair', {}); + +Chair.findAll({ + where: { + color: 'blue', + legs: { $in: [3, 4] }, + }, +}); + +// If you want to use a property that isn't explicitly on the model's Attributes +// use the find-function's generic type parameter. +Chair.findAll<{ customProperty: number }>({ + where: { + customProperty: 123, + } +}); +Chair.findAll({ + where: { + customProperty1: 123, + customProperty2: 456, + } +}); + s.define( 'ScopeMe', { username : Sequelize.STRING, email : Sequelize.STRING, @@ -1640,21 +1671,21 @@ s.transaction({ }); s.transaction( function() { - return Bluebird.resolve(); + return Promise.resolve(); } ); -s.transaction( { isolationLevel : 'SERIALIZABLE' }, function( t ) { return Bluebird.resolve(); } ); -s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.SERIALIZABLE }, (t) => Bluebird.resolve() ); -s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.READ_COMMITTED }, (t) => Bluebird.resolve() ); +s.transaction( { isolationLevel : 'SERIALIZABLE' }, function( t ) { return Promise.resolve(); } ); +s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.SERIALIZABLE }, (t) => Promise.resolve() ); +s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.READ_COMMITTED }, (t) => Promise.resolve() ); // transaction types new Sequelize( '', { transactionType: 'DEFERRED' } ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.DEFERRED} ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.IMMEDIATE} ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.EXCLUSIVE} ); -s.transaction( { type : 'DEFERRED' }, (t) => Bluebird.resolve() ); -s.transaction( { type : s.Transaction.TYPES.DEFERRED }, (t) => Bluebird.resolve() ); -s.transaction( { type : s.Transaction.TYPES.IMMEDIATE }, (t) => Bluebird.resolve() ); -s.transaction( { type : s.Transaction.TYPES.EXCLUSIVE }, (t) => Bluebird.resolve() ); +s.transaction( { type : 'DEFERRED' }, (t) => Promise.resolve() ); +s.transaction( { type : s.Transaction.TYPES.DEFERRED }, (t) => Promise.resolve() ); +s.transaction( { type : s.Transaction.TYPES.IMMEDIATE }, (t) => Promise.resolve() ); +s.transaction( { type : s.Transaction.TYPES.EXCLUSIVE }, (t) => Promise.resolve() ); // promise transaction s.transaction(async () => { @@ -1662,14 +1693,19 @@ s.transaction(async () => { s.transaction((): Promise => { return Promise.resolve(); }); -s.transaction((): Bluebird => { - return Bluebird.resolve(); +s.transaction((): Promise => { + return Promise.resolve(); }); s.transaction((): Q.Promise => { return Q.Promise((resolve) => { resolve(null); }); }); +s.transaction((): Bluebird => { + return new Bluebird((resolve) => { + resolve(null); + }); +}); // sync options types s.sync({ From c529e86caa635547021153beb9546f0b56c8c8e5 Mon Sep 17 00:00:00 2001 From: Clark Stevenson Date: Sat, 1 Jul 2017 20:31:07 +0100 Subject: [PATCH 04/14] Pixi.js minor update to v4.5.3 --- types/pixi.js/index.d.ts | 130 ++++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 42 deletions(-) diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index bcf403d475..d847babaae 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -199,25 +199,6 @@ declare namespace PIXI { // display - interface ApplicationOptions extends RendererOptions { - view?: HTMLCanvasElement; - transparent?: boolean; - autoResize?: boolean; - antialias?: boolean; - resolution?: number; - clearBeforeRender?: boolean; - backgroundColor?: number; - roundPixels?: boolean; - context?: WebGLRenderingContext; - preserveDrawingBuffer?: boolean; - legacy?: boolean; - width?: number; - height?: number; - forceCanvas?: boolean; - sharedTicker?: boolean; - sharedLoader?: boolean; - } - class Application { constructor(options?: ApplicationOptions) constructor(width?: number, height?: number, options?: ApplicationOptions, noWebGL?: boolean, sharedTicker?: boolean, sharedLoader?: boolean); @@ -725,18 +706,91 @@ declare namespace PIXI { } // renderers interface RendererOptions { - view?: HTMLCanvasElement; - transparent?: boolean; - autoResize?: boolean; - antialias?: boolean; - resolution?: number; - clearBeforeRender?: boolean; - backgroundColor?: number; - roundPixels?: boolean; - context?: WebGLRenderingContext; + /** + * the width of the renderers view [default=800] + */ width?: number; + + /** + * the height of the renderers view [default=600] + */ height?: number; + + /** + * the canvas to use as a view, optional + */ + view?: HTMLCanvasElement; + + /** + * If the render view is transparent, [default=false] + */ + transparent?: boolean; + + /** + * sets antialias (only applicable in chrome at the moment) [default=false] + */ + antialias?: boolean; + + /** + * enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context [default=false] + */ + preserveDrawingBuffer?: boolean; + + /** + * The resolution / device pixel ratio of the renderer, retina would be 2 [default=1] + */ + resolution?: number; + + /** + * prevents selection of WebGL renderer, even if such is present [default=false] + */ forceCanvas?: boolean; + + /** + * The background color of the rendered area (shown if not transparent) [default=0x000000] + */ + backgroundColor?: number; + + /** + * This sets if the renderer will clear the canvas or not before the new render pass. [default=true] + */ + clearBeforeRender?: boolean; + + /** + * If true Pixi will Math.floor() x/ y values when rendering, stopping pixel interpolation. [default=false] + */ + roundPixels?: boolean; + + /** + * forces FXAA antialiasing to be used over native FXAA is faster, but may not always look as great ** webgl only** [default=false] + */ + forceFXAA?: boolean; + + /** + * `true` to ensure compatibility with older / less advanced devices. If you experience unexplained flickering try setting this to true. **webgl only** [default=false] + */ + legacy?: boolean; + + /** + * Depricated + */ + context?: WebGLRenderingContext; + + /** + * Depricated + */ + autoResize?: boolean; + } + interface ApplicationOptions extends RendererOptions { + /** + * `true` to use PIXI.ticker.shared, `false` to create new ticker. [default=false] + */ + sharedTicker?: boolean; + + /** + * `true` to use PIXI.loaders.shared, `false` to create new Loader. + */ + sharedLoader?: boolean; } class SystemRenderer extends utils.EventEmitter { constructor(system: string, options?: RendererOptions); @@ -825,20 +879,7 @@ declare namespace PIXI { resize(width: number, height: number): void; destroy(): void; } - interface WebGLRendererOptions { - view?: HTMLCanvasElement; - transparent?: boolean; - autoResize?: boolean; - antialias?: boolean; - forceFXAA?: boolean; - resolution?: number; - clearBeforeRender?: boolean; - backgroundColor?: number; - preserveDrawingBuffer?: boolean; - roundPixels?: boolean; - legacy?: boolean; - width?: number; - height?: number; + interface WebGLRendererOptions extends RendererOptions { } class WebGLRenderer extends SystemRenderer { // plugintarget mixin start @@ -2713,6 +2754,11 @@ declare namespace PIXI { function isWebGLSupported(): boolean; function sign(n: number): number; function removeItems(arr: T[], startIdx: number, removeCount: number): void; + function correctBlendMode(blendMode: number, premultiplied: boolean): number; + function premultiplyTint(tint: number, alpha: number): number; + function premultiplyRgba(rgb: Float32Array | number[], alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array; + function premultiplyTintToRgba(tint: number, alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array; + const premultiplyBlendMode: number[][]; const TextureCache: any; const BaseTextureCache: any; From 0ea94a0d2ece04c9ecaedf21e44621c23ca89869 Mon Sep 17 00:00:00 2001 From: Clark Stevenson Date: Sat, 1 Jul 2017 21:03:36 +0100 Subject: [PATCH 05/14] Quick bug fix --- types/pixi.js/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index d847babaae..f7410baaa6 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -2553,12 +2553,18 @@ declare namespace PIXI { protected maxItemsPerFrame: number; protected itemsLeft: number; + + beginFrame(): void; + allowedToUpload(): boolean; } class TimeLimiter { constructor(maxMilliseconds: number); protected maxMilliseconds: number; protected frameStart: number; + + beginFrame(): void; + allowedToUpload(): boolean; } } From 370d4fca0035b771070e0eceb4b7e363046c0bd9 Mon Sep 17 00:00:00 2001 From: Augustin Peyrard Date: Fri, 30 Jun 2017 21:11:20 -0700 Subject: [PATCH 06/14] fix: in `node.readline` `cursorTo` allows only x coordinate Like this we are easily able to move in the current line with absolute x-axis coordinate. --- types/node/index.d.ts | 2 +- types/node/node-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index f9716e3e83..4fbcfd8279 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1731,7 +1731,7 @@ declare module "readline" { export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine; export function createInterface(options: ReadLineOptions): ReadLine; - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; export function clearLine(stream: NodeJS.WritableStream, dir: number): void; export function clearScreenDown(stream: NodeJS.WritableStream): void; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 84625061a2..fef0cd9862 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -1410,6 +1410,7 @@ namespace readline_tests { let x: number; let y: number; + readline.cursorTo(stream, x); readline.cursorTo(stream, x, y); } From 1bdaeb9cbfade9ba325392fde20f5e9d57d0c72e Mon Sep 17 00:00:00 2001 From: Jason Wu Date: Sun, 2 Jul 2017 11:47:34 -0500 Subject: [PATCH 07/14] Wrote it as an external module --- types/draggabilly/index.d.ts | 70 +++++++++++++++------------------ types/draggabilly/tsconfig.json | 2 +- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/types/draggabilly/index.d.ts b/types/draggabilly/index.d.ts index c614796ca9..f376ea8fbd 100644 --- a/types/draggabilly/index.d.ts +++ b/types/draggabilly/index.d.ts @@ -4,43 +4,35 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// export = Backbone; -// export as namespace Backbone; - -declare module 'draggabilly' { - interface Position { - x: number; - y: number; - } - - export interface DraggabillyOptions { - axis?: 'x' | 'y'; - containment?: Element | string | boolean; - grid?: [number, number]; - handle?: string; - } - - export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp' - | 'staticClick'; - - export default class Draggabilly { - position: Position; - - constructor(element: Element | string, options?: DraggabillyOptions); - - on(eventName: DraggabillyEventName, - listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void; - - off(eventName: DraggabillyEventName, - listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void; - - once(eventName: DraggabillyEventName, - listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): void; - - enable(): void; - - disable(): void; - - destroy(): void; - } +export interface Position { + x: number; + y: number; +} + +export interface DraggabillyOptions { + axis?: 'x' | 'y'; + containment?: Element | string | boolean; + grid?: [number, number]; + handle?: string; +} + +export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp' + | 'staticClick'; + +export default class Draggabilly { + position: Position; + + constructor(element: Element | string, options?: DraggabillyOptions); + + on(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + off(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + once(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): Draggabilly; + + enable(): void; + + disable(): void; + + destroy(): void; } diff --git a/types/draggabilly/tsconfig.json b/types/draggabilly/tsconfig.json index c0873c7293..32cc6ee235 100644 --- a/types/draggabilly/tsconfig.json +++ b/types/draggabilly/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" From 7c9c69ade07a80533ebf356a6ee662fe45a65109 Mon Sep 17 00:00:00 2001 From: Tom Sherman Date: Sun, 2 Jul 2017 15:27:13 -0700 Subject: [PATCH 08/14] @types/mapbox-gl: allow StyleFunction for circle-color Fix regression that removed StyleFunction from circle-color type set --- types/mapbox-gl/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 680362fe82..5e08da57b6 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Mapbox GL JS v0.39.0 +// Type definitions for Mapbox GL JS v0.39.1 // Project: https://github.com/mapbox/mapbox-gl-js // Definitions by: Dominik Bruderer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -706,7 +706,7 @@ declare namespace mapboxgl { angleWidth(p: Point): number; angleWithSep(x: number, y: number): number; - + convert(a: Array | Point): Point; } @@ -1045,7 +1045,7 @@ declare namespace mapboxgl { export interface CirclePaint { "circle-radius"?: number | StyleFunction; "circle-radius-transition"?: Transition; - "circle-color"?: string; + "circle-color"?: string | StyleFunction; "circle-blur"?: number | StyleFunction; "circle-opacity"?: number | StyleFunction; "circle-translate"?: number[]; From 79317ed00f0ac565778ef61ce80b1dc9806e9484 Mon Sep 17 00:00:00 2001 From: mmkal Date: Sun, 2 Jul 2017 22:02:46 -0400 Subject: [PATCH 09/14] go back to bluebird promises --- types/sequelize/index.d.ts | 1 + types/sequelize/sequelize-tests.ts | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 8d0a379bbe..cc4934a41c 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -10,6 +10,7 @@ import * as _ from "lodash"; +import * as Promise from "bluebird"; declare namespace sequelize { diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 3f8001f4f1..e9a8924053 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -983,7 +983,7 @@ User.create( { title : 'Chair', creator : { first_name : 'Matt', last_name : 'Ha User.create( { id : 1, title : 'e', Tags : [{ id : 1, name : 'c' }, { id : 2, name : 'd' }] }, { include : [User] } ); User.create( { id : 'My own ID!' } ).then( ( i ) => i.isNewRecord ); -let findOrRetVal: Promise<[AnyInstance, boolean]>; +let findOrRetVal: Bluebird<[AnyInstance, boolean]>; findOrRetVal = User.findOrInitialize( { where : { username : 'foo' } } ); findOrRetVal = User.findOrInitialize( { where : { username : 'foo' }, transaction : t } ); findOrRetVal = User.findOrInitialize( { where : { username : 'foo' }, defaults : { foo : 'asd' }, transaction : t } ); @@ -1701,11 +1701,6 @@ s.transaction((): Q.Promise => { resolve(null); }); }); -s.transaction((): Bluebird => { - return new Bluebird((resolve) => { - resolve(null); - }); -}); // sync options types s.sync({ From b40190a3414225d0ff250269e12c9154a616aeb9 Mon Sep 17 00:00:00 2001 From: mmkal Date: Sun, 2 Jul 2017 22:07:06 -0400 Subject: [PATCH 10/14] revert some more bluebird changes --- types/sequelize/sequelize-tests.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index e9a8924053..fcb273f5e2 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -1671,21 +1671,21 @@ s.transaction({ }); s.transaction( function() { - return Promise.resolve(); + return Bluebird.resolve(); } ); -s.transaction( { isolationLevel : 'SERIALIZABLE' }, function( t ) { return Promise.resolve(); } ); -s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.SERIALIZABLE }, (t) => Promise.resolve() ); -s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.READ_COMMITTED }, (t) => Promise.resolve() ); +s.transaction( { isolationLevel : 'SERIALIZABLE' }, function( t ) { return Bluebird.resolve(); } ); +s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.SERIALIZABLE }, (t) => Bluebird.resolve() ); +s.transaction( { isolationLevel : s.Transaction.ISOLATION_LEVELS.READ_COMMITTED }, (t) => Bluebird.resolve() ); // transaction types new Sequelize( '', { transactionType: 'DEFERRED' } ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.DEFERRED} ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.IMMEDIATE} ); new Sequelize( '', { transactionType: Sequelize.Transaction.TYPES.EXCLUSIVE} ); -s.transaction( { type : 'DEFERRED' }, (t) => Promise.resolve() ); -s.transaction( { type : s.Transaction.TYPES.DEFERRED }, (t) => Promise.resolve() ); -s.transaction( { type : s.Transaction.TYPES.IMMEDIATE }, (t) => Promise.resolve() ); -s.transaction( { type : s.Transaction.TYPES.EXCLUSIVE }, (t) => Promise.resolve() ); +s.transaction( { type : 'DEFERRED' }, (t) => Bluebird.resolve() ); +s.transaction( { type : s.Transaction.TYPES.DEFERRED }, (t) => Bluebird.resolve() ); +s.transaction( { type : s.Transaction.TYPES.IMMEDIATE }, (t) => Bluebird.resolve() ); +s.transaction( { type : s.Transaction.TYPES.EXCLUSIVE }, (t) => Bluebird.resolve() ); // promise transaction s.transaction(async () => { @@ -1693,8 +1693,8 @@ s.transaction(async () => { s.transaction((): Promise => { return Promise.resolve(); }); -s.transaction((): Promise => { - return Promise.resolve(); +s.transaction((): Bluebird => { + return Bluebird.resolve(); }); s.transaction((): Q.Promise => { return Q.Promise((resolve) => { From d5aba66148f69167cdf22d7c858f5a7b5bc3f072 Mon Sep 17 00:00:00 2001 From: Gavin Sitthiampornphan Date: Mon, 3 Jul 2017 10:51:09 +0700 Subject: [PATCH 11/14] Types for error and warning should not be a string From the [doc](http://redux-form.com/6.8.0/docs/api/Field.md/), error and warning are > usually, but not necessarily, a String --- types/redux-form/lib/Field.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/redux-form/lib/Field.d.ts b/types/redux-form/lib/Field.d.ts index d2439d87a6..ecef15b4c7 100644 --- a/types/redux-form/lib/Field.d.ts +++ b/types/redux-form/lib/Field.d.ts @@ -278,7 +278,7 @@ interface WrappedFieldMetaProps { * The error for this field if its value is not passing validation. Both * synchronous, asynchronous, and submit validation errors will be reported here. */ - error?: string; + error?: any; /** * The name of the form. Could be useful if you want to manually dispatch actions. @@ -329,5 +329,5 @@ interface WrappedFieldMetaProps { /** * The warning for this field if its value is not passing warning validation. */ - warning?: string; + warning?: any; } From 48df7f24d75d66b6313058c16ede7a4513e3104d Mon Sep 17 00:00:00 2001 From: Jason Wu Date: Tue, 4 Jul 2017 01:08:50 -0500 Subject: [PATCH 12/14] Overloaded functions to support the moveVector parameter for the 'dragMove' and 'pointerMove' events --- types/draggabilly/index.d.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/types/draggabilly/index.d.ts b/types/draggabilly/index.d.ts index f376ea8fbd..6307c424ab 100644 --- a/types/draggabilly/index.d.ts +++ b/types/draggabilly/index.d.ts @@ -16,19 +16,26 @@ export interface DraggabillyOptions { handle?: string; } -export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp' - | 'staticClick'; +export type DraggabillyClickEventName = 'dragStart' | 'dragEnd' | 'pointerDown' | 'pointerUp' | 'staticClick'; + +export type DraggabillyMoveEventName = 'dragMove' | 'pointerMove'; export default class Draggabilly { position: Position; constructor(element: Element | string, options?: DraggabillyOptions); - on(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + on(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; - off(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + on(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; - once(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): Draggabilly; + off(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; + + off(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; + + once(eventName: DraggabillyClickEventName, listener: (event: Event, pointer: MouseEvent | Touch) => void): Draggabilly; + + once(eventName: DraggabillyMoveEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly; enable(): void; From 26ed016814acc9b5a8c0b2f95e08b8f89bf3a9c8 Mon Sep 17 00:00:00 2001 From: Savva Surenkov Date: Sat, 1 Jul 2017 17:23:18 +1000 Subject: [PATCH 13/14] [jsonp] add jsonp typings --- types/jsonp/index.d.ts | 19 +++++++++++++++++++ types/jsonp/jsonp-tests.ts | 28 ++++++++++++++++++++++++++++ types/jsonp/tsconfig.json | 21 +++++++++++++++++++++ types/jsonp/tslint.json | 6 ++++++ 4 files changed, 74 insertions(+) create mode 100644 types/jsonp/index.d.ts create mode 100644 types/jsonp/jsonp-tests.ts create mode 100644 types/jsonp/tsconfig.json create mode 100644 types/jsonp/tslint.json diff --git a/types/jsonp/index.d.ts b/types/jsonp/index.d.ts new file mode 100644 index 0000000000..3f1df60c87 --- /dev/null +++ b/types/jsonp/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for jsonp 0.2 +// Project: https://github.com/LearnBoost/jsonp +// Definitions by: Savva Surenkov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = jsonp; + +declare function jsonp(url: string, options?: Options, cb?: RequestCallback): CancelFn; +declare function jsonp(url: string, callback?: RequestCallback): CancelFn; + +type CancelFn = () => void; +type RequestCallback = (error: Error | null, data: any) => void; + +interface Options { + param?: string; + prefix?: string; + name?: string; + timeout?: number; +} diff --git a/types/jsonp/jsonp-tests.ts b/types/jsonp/jsonp-tests.ts new file mode 100644 index 0000000000..703e104912 --- /dev/null +++ b/types/jsonp/jsonp-tests.ts @@ -0,0 +1,28 @@ +import jsonp = require('jsonp'); + +/** + * Dummy response callback. + */ +const print = (err: Error | null, data: any) => + console.log(err !== null ? err.message : data); + +/** + * Tests jsonp request with default parameters. + */ +const cancel1 = jsonp('https://jsonplaceholder.typicode.com/posts/1', print); +cancel1(); + +/** + * Tests parametrized jsonp request. + */ +const cancel2 = jsonp( + 'https://jsonplaceholder.typicode.com/posts/1', + { + param: 'cb', + timeout: 40000, + prefix: '_jsonp', + name: 'func', + }, + print, +); +cancel2(); diff --git a/types/jsonp/tsconfig.json b/types/jsonp/tsconfig.json new file mode 100644 index 0000000000..4ba94d9d89 --- /dev/null +++ b/types/jsonp/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jsonp-tests.ts" + ] +} diff --git a/types/jsonp/tslint.json b/types/jsonp/tslint.json new file mode 100644 index 0000000000..a62d0d4e68 --- /dev/null +++ b/types/jsonp/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false + } +} From 55f6c16919e438da55ef464712682f9e06957065 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Wed, 5 Jul 2017 16:50:18 -0700 Subject: [PATCH 14/14] This should've been in the types folder. --- {is-alphanumerical => types/is-alphanumerical}/index.d.ts | 0 .../is-alphanumerical}/is-alphanumerical-tests.ts | 0 {is-alphanumerical => types/is-alphanumerical}/tsconfig.json | 0 {is-alphanumerical => types/is-alphanumerical}/tslint.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {is-alphanumerical => types/is-alphanumerical}/index.d.ts (100%) rename {is-alphanumerical => types/is-alphanumerical}/is-alphanumerical-tests.ts (100%) rename {is-alphanumerical => types/is-alphanumerical}/tsconfig.json (100%) rename {is-alphanumerical => types/is-alphanumerical}/tslint.json (100%) diff --git a/is-alphanumerical/index.d.ts b/types/is-alphanumerical/index.d.ts similarity index 100% rename from is-alphanumerical/index.d.ts rename to types/is-alphanumerical/index.d.ts diff --git a/is-alphanumerical/is-alphanumerical-tests.ts b/types/is-alphanumerical/is-alphanumerical-tests.ts similarity index 100% rename from is-alphanumerical/is-alphanumerical-tests.ts rename to types/is-alphanumerical/is-alphanumerical-tests.ts diff --git a/is-alphanumerical/tsconfig.json b/types/is-alphanumerical/tsconfig.json similarity index 100% rename from is-alphanumerical/tsconfig.json rename to types/is-alphanumerical/tsconfig.json diff --git a/is-alphanumerical/tslint.json b/types/is-alphanumerical/tslint.json similarity index 100% rename from is-alphanumerical/tslint.json rename to types/is-alphanumerical/tslint.json