Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add component $emit typing support #846

Merged
merged 2 commits into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: update type test cases from vue3
  • Loading branch information
xiaoxiangmoe committed Nov 7, 2021
commit 087d052564461ed599bc5676bd286cfd3fd9cff1
725 changes: 0 additions & 725 deletions test-dts/defineComponent.test-d.ts

This file was deleted.

1,152 changes: 1,152 additions & 0 deletions test-dts/defineComponent.test-d.tsx

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions test-dts/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type {} from '@vue/runtime-dom'
export * from '@vue/composition-api'
// export * from 'vue3'

Expand All @@ -11,3 +12,9 @@ export function expectAssignable<T, T2 extends T = T>(value: T2): void
type IfNotAny<T> = 0 extends 1 & T ? never : T
type IfNotUndefined<T> = Exclude<T, undefined> extends never ? never : T
export function isNotAnyOrUndefined<T>(value: IfNotAny<IfNotUndefined<T>>): void

export type IsUnion<T, U extends T = T> = (
T extends any ? (U extends T ? false : true) : never
) extends false
? false
: true
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions test-dts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"noEmit": true,
"declaration": true,
"baseUrl": ".",
"jsx": "preserve",
"paths": {
"@vue/composition-api": ["../src"]
}
},
"exclude": ["../test"],
"include": ["../src", "./*.ts"]
}
"include": ["../src", "./*.ts", "./*.tsx"]
}
File renamed without changes.