From 3a8adb62ac4a00fc7e970e8d7d61c2be87c7eadf Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 20 Jan 2020 12:11:06 +0100 Subject: [PATCH] fix(types): fix for ts 3.7 --- package.json | 2 +- types/index.d.ts | 28 ++++++++++------------------ yarn.lock | 8 ++++---- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index babf93d..ab710e9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint-config-posva": "^3.0.2", "faked-promise": "^2.1.0", "jest": "^24.7.1", - "typescript": "^3.4.3", + "typescript": "^3.7.5", "vue": "^2.6.10", "vue-jest": "^3.0.4", "vue-template-compiler": "^2.6.10" diff --git a/types/index.d.ts b/types/index.d.ts index 85e1e9d..7dcc511 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3,29 +3,21 @@ import { DefaultComputed, ComponentOptions, PropsDefinition, + PropType } from 'vue/types/options' -import { Vue } from 'vue/types/vue'; +import { Vue } from 'vue/types/vue' -interface Data { - (): { +export declare var Promised: { + props: { + tag: PropType + promise: PropType | null> + pendingDelay: PropType + } + + data: () => { resolved: boolean data: any | null error: any | null - isDelayElapsed: boolean } } - -interface Props { - tag: String - promise: Promise | null - pendingDelay: Number | String -} - -export var Promised: ComponentOptions< - Vue, - Data, - DefaultMethods, - DefaultComputed, - PropsDefinition -> diff --git a/yarn.lock b/yarn.lock index 423c2fb..d598646 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5027,10 +5027,10 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -typescript@^3.4.3: - version "3.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d" - integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg== +typescript@^3.7.5: + version "3.7.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" + integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== uglify-js@^3.1.4: version "3.7.2"