From a697e64bca3f6bfc15d75ffbffc8ba88c0589964 Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Mon, 30 Jul 2018 22:57:50 +0300 Subject: [PATCH] Update to typescript 3.0.1 --- package.json | 2 +- src/custom-nodes/AbstractCustomNode.ts | 4 ++-- src/interfaces/IInitializable.d.ts | 4 ++-- src/interfaces/custom-nodes/ICustomNode.d.ts | 2 +- .../source-code/IObfuscatedCode.d.ts | 2 +- src/interfaces/storages/IArrayStorage.d.ts | 5 ----- src/interfaces/storages/IMapStorage.d.ts | 5 ----- src/types/TObject.d.ts | 2 +- tslint.json | 2 +- yarn.lock | 18 +++++++++--------- 10 files changed, 18 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 4e29617b..3e1b983d 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "tslint-language-service": "0.9.9", "tslint-microsoft-contrib": "5.1.0", "tslint-webpack-plugin": "1.2.2", - "typescript": "2.9.2", + "typescript": "3.0.1", "webpack": "4.16.3", "webpack-cli": "3.1.0", "webpack-node-externals": "1.7.2" diff --git a/src/custom-nodes/AbstractCustomNode.ts b/src/custom-nodes/AbstractCustomNode.ts index 528d3551..efb95847 100644 --- a/src/custom-nodes/AbstractCustomNode.ts +++ b/src/custom-nodes/AbstractCustomNode.ts @@ -59,9 +59,9 @@ export abstract class AbstractCustomNode implements ICustomNode { } /** - * @param {any[]} args + * @param {unknown[]} args */ - public abstract initialize (...args: any[]): void; + public abstract initialize (...args: unknown[]): void; /** * @returns {TStatement[]} diff --git a/src/interfaces/IInitializable.d.ts b/src/interfaces/IInitializable.d.ts index c37640bf..673c0f39 100644 --- a/src/interfaces/IInitializable.d.ts +++ b/src/interfaces/IInitializable.d.ts @@ -1,8 +1,8 @@ -export interface IInitializable { +export interface IInitializable { [key: string]: any; /** * @param args */ - initialize (...args: any[]): void; + initialize (...args: T): void; } diff --git a/src/interfaces/custom-nodes/ICustomNode.d.ts b/src/interfaces/custom-nodes/ICustomNode.d.ts index 72446880..949a4113 100644 --- a/src/interfaces/custom-nodes/ICustomNode.d.ts +++ b/src/interfaces/custom-nodes/ICustomNode.d.ts @@ -2,7 +2,7 @@ import { TStatement } from '../../types/node/TStatement'; import { IInitializable } from '../IInitializable'; -export interface ICustomNode extends IInitializable { +export interface ICustomNode extends IInitializable { /** * @returns ESTree.Node[] */ diff --git a/src/interfaces/source-code/IObfuscatedCode.d.ts b/src/interfaces/source-code/IObfuscatedCode.d.ts index bdbfab5a..ac395e21 100644 --- a/src/interfaces/source-code/IObfuscatedCode.d.ts +++ b/src/interfaces/source-code/IObfuscatedCode.d.ts @@ -1,6 +1,6 @@ import { IInitializable } from '../IInitializable'; -export interface IObfuscatedCode extends IInitializable { +export interface IObfuscatedCode extends IInitializable <[string, string]> { /** * @return {string} */ diff --git a/src/interfaces/storages/IArrayStorage.d.ts b/src/interfaces/storages/IArrayStorage.d.ts index ab4239c7..30095fb6 100644 --- a/src/interfaces/storages/IArrayStorage.d.ts +++ b/src/interfaces/storages/IArrayStorage.d.ts @@ -28,11 +28,6 @@ export interface IArrayStorage extends IInitializable { */ getStorageId (): string; - /** - * @param args - */ - initialize (...args: any[]): void; - /** * @param storage * @param mergeId diff --git a/src/interfaces/storages/IMapStorage.d.ts b/src/interfaces/storages/IMapStorage.d.ts index 617b178d..c94bcd0e 100644 --- a/src/interfaces/storages/IMapStorage.d.ts +++ b/src/interfaces/storages/IMapStorage.d.ts @@ -34,11 +34,6 @@ export interface IMapStorage extends IInitializable { */ has (key: K): boolean; - /** - * @param args - */ - initialize (...args: any[]): void; - /** * @param storage * @param mergeId diff --git a/src/types/TObject.d.ts b/src/types/TObject.d.ts index 589e92d0..7aac93df 100644 --- a/src/types/TObject.d.ts +++ b/src/types/TObject.d.ts @@ -1,3 +1,3 @@ /* tslint:disable:interface-over-type-literal */ -export type TObject = {[key: string]: T}; +export type TObject = {[key: string]: T}; diff --git a/tslint.json b/tslint.json index 504b5c66..73163051 100644 --- a/tslint.json +++ b/tslint.json @@ -135,7 +135,7 @@ "no-unnecessary-class": [true, "allow-static-only"], "no-unnecessary-initializer": true, "no-unnecessary-field-initialization": true, - "no-unnecessary-local-variable": true, + "no-unnecessary-local-variable": false, "no-unexpected-multiline": true, "no-unsafe-any": false, "no-unsafe-finally": true, diff --git a/yarn.lock b/yarn.lock index 362eab7a..0350b5a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1458,11 +1458,11 @@ combined-stream@1.0.6, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.15.1, commander@^2.12.1, commander@^2.8.1: +commander@2.15.1, commander@^2.8.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@2.16.0: +commander@2.16.0, commander@^2.12.1: version "2.16.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" @@ -4325,11 +4325,11 @@ ts-node@6.1.0: source-map-support "^0.5.6" yn "^2.0.0" -tslib@1.9.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1: +tslib@1.9.0, tslib@^1.7.1, tslib@^1.8.1: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" -tslib@1.9.3: +tslib@1.9.3, tslib@^1.8.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -4393,8 +4393,8 @@ tsutils@^2.12.1: tslib "^1.8.1" tsutils@^2.27.2: - version "2.28.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.28.0.tgz#6bd71e160828f9d019b6f4e844742228f85169a1" + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" dependencies: tslib "^1.8.1" @@ -4426,9 +4426,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.1.tgz#43738f29585d3a87575520a4b93ab6026ef11fdb" uglify-es@^3.3.4: version "3.3.9"