Skip to content

Commit

Permalink
test: 测试ts 声明
Browse files Browse the repository at this point in the history
  • Loading branch information
sifan committed Sep 16, 2021
1 parent 7b51e89 commit 2b2286e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build && npx gulp
- run: npm publish
- run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue3-count-to",
"version": "1.0.11",
"version": "1.0.12-beta.1",
"description": "vue-count-to 支持vue2、vue3版本",
"main": "dist/vue3-count-to.min.js",
"module": "dist/vue3-count-to.esm.js",
Expand Down
20 changes: 20 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
// @ts-ignore
import Vue, { App, PluginFunction } from "vue";

export declare class CountTo {
startVal: number;
endVal: number;
duration: number;
autoplay: boolean;
decimals: number;
decimal: number;
separator: number;
prefix: number;
suffix: number;
useEasing: boolean;

easingFn: () => void;

start(): void;
pause(): void;
reset(): void;
}

// @ts-ignore
export declare class CountTo extends Vue {
startVal: number;
Expand All @@ -22,6 +41,7 @@ export declare class CountTo extends Vue {
reset(): void;
}

// extends Vue
export default class {
static install (app: App): void;
static install (app: PluginFunction<never>): void;
Expand Down

0 comments on commit 2b2286e

Please sign in to comment.