Skip to content

Commit

Permalink
chore(style): Updated ts-lint and applied its suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Feb 8, 2019
1 parent ba6d9a3 commit db9cb3d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 41 deletions.
64 changes: 30 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -64,8 +64,8 @@
"sinon-chai": "3.3.0",
"travis-deploy-once": "5.0.11",
"ts-node": "7.0.1",
"tslint": "5.11.0",
"tslint-microsoft-contrib": "5.2.0",
"tslint": "5.12.1",
"tslint-microsoft-contrib": "6.0.0",
"typescript": "3.0.1"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/TinyType.ts
Expand Up @@ -19,7 +19,7 @@ import { JSONObject, JSONValue, NonNullJSONPrimitive, Serialisable, Serialised }
*
* @returns a dynamically created base class your tiny type can extend from
*/
export function TinyTypeOf<T>(): { new(_: T): { value: T } & TinyType } {
export function TinyTypeOf<T>(): new(_: T) => { value: T } & TinyType {
return class extends TinyType {
constructor(public readonly value: T) {
super();
Expand Down
2 changes: 1 addition & 1 deletion src/predicates/isInstanceOf.ts
Expand Up @@ -15,6 +15,6 @@ import { Predicate } from './Predicate';
* @param {Constructor<T>} type
* @returns {Predicate<T>}
*/
export function isInstanceOf<T>(type: { new (...args: any[]): T }): Predicate<T> {
export function isInstanceOf<T>(type: new (...args: any[]) => T): Predicate<T> {
return Predicate.to(`be instance of ${type.name}`, (value: T) => value instanceof type);
}
4 changes: 1 addition & 3 deletions src/types/constructors.ts
@@ -1,5 +1,3 @@
export interface Constructor<T> {
new (...args: any[]): T;
}
export type Constructor<T> = new (...args: any[]) => T;
export type ConstructorOrAbstract<T = {}> = Function & { prototype: T }; // tslint:disable-line:ban-types
export type ConstructorAbstractOrInstance<T = {}> = T | ConstructorOrAbstract; // tslint:disable-line:ban-types

0 comments on commit db9cb3d

Please sign in to comment.