WORMSS
2b93e86aa1
fix(types): make $refs undefined possible ( #11112 )
Added undefined as a return type of $refs as it was quite hard to convince typescript that something COULD be undefined if you type in a ref that doesn't exist,
I also changed the two array statements from `Element[] | Vue[]` to `(Element | Vue)[]` because it's not guaranteed that they are ALL Elements or they are ALL Vue components. (Very likely, yes, but not always)
For example
```html
<template v-for="(a, index) of b">
<div v-if="index % 2 === 0" ref="test"></div>
<my-component v-else ref="test"></my-component>
</template>
```
4 years ago
Flo Edelmann
e0274e4320
fix(types): add types for Vue.util.warn function ( #11964 )
See https://github.com/vuejs/vue/blob/v2.6.12/src/core/util/debug.js#L18-L26
4 years ago
DSha
731e4d0ebc
types: use normalized type for `RenderContext.scopedSlots` ( #9624 )
fix #9616
6 years ago
Kael
241eea19a6
fix(types): allow scoped slots to return a single VNode ( #9563 )
6 years ago
Gcaufy
f33301619d
fix(types): update this for nextTick api ( #9541 )
6 years ago
Sebastian Krüger
54e6a121e9
fix(types): add Vue.version to types ( #9431 )
6 years ago
Evan You
fe2b27ffb9
types: typing for Vue.observable
6 years ago
Evan You
3504d7f6d6
refactor: better solution for async edge case.
Revert event delegation related changes.
6 years ago
Evan You
3be1c5d67e
feat(config): expose config.useEventDelegation and default to false
6 years ago
Herrington Darkholme
e06d2af276
fix(types): avoid `this` in VueConstructor signature ( #9173 )
https://github.com/vuejs/vue-class-component/issues/294#issuecomment-445526936
6 years ago
James George
b0ccb86183
chore: rephrase comment ( #9100 )
6 years ago
hugoazevedosoares
97086f3658
fix(types): fix vm.$once argument type ( #8995 )
vm.$once should accept an event or array of events as first parameter.
fix #8983
6 years ago
thenickname
76443803e8
Typings: Improve $slots and $scopedSlots type to prevent unchecked access to undefined ( #8946 )
* fix(types): Declare $scopedSlots as potentially undefined to enable stricter TS checks
* fix(types): Fix tests
* fix(types): declare $slots option as potentially undefined
declare $slots option as potentially undefined to enable stricter TS checks
6 years ago
Kaoru Hagihara
3cd4af4af0
fix(types): support typing $el as SVGElement ( #8809 )
6 years ago
nel215
0ba79e2588
fix(types): accept `number` type as key on Vue.set/delete ( #8707 ) ( #8709 )
6 years ago
狼族小狈
c711ec189a
fix(types): support chain call for Vue.use and Vue.mixin ( #8595 )
6 years ago
Edd Yerburgh
c94482743c
feat: add async option ( #8240 )
This is an option intended only for testing purposes, and should not be used in
application code.
6 years ago
Herrington Darkholme
144bf5a99e
fix(types): prefer normal component over functional one ( #7687 )
7 years ago
Wenlu Wang
c0d516c283
feat(types): extract VueConfiguration type for easy expansion ( #7273 ) ( #7274 )
fix #7273
7 years ago
Zen
d2e1d49c41
fix(types): use object and string instead of Object and String ( #7126 )
7 years ago
Herrington Darkholme
a71e653108
fix(types): bump ts version and fix typing bugs ( #7135 )
7 years ago
Herrington Darkholme
98ea0a3b48
fix(types): improve typing for better completion ( #6886 )
7 years ago
Herrington Darkholme
9caed00d20
fix(typing): relax $options type for TS2.6+ ( #6819 )
7 years ago
Evan You
1be48d0a13
types: update types for config.ignoredElements
7 years ago
Herrington Darkholme
db138e2254
feat(types): further improve Vue type declarations for canonical usage ( #6391 )
7 years ago
Alexander Eden
64e3943842
types: extend keyCodes type declaration to allow array of numbers ( #6745 )
7 years ago
Herrington Darkholme
38d52182bf
fix(types): allow variadic plugin use ( #6363 )
fix #6357
7 years ago
赵鑫晖
59dbd4a414
fix: ensure $attrs and $listeners are always objects ( #6441 )
fix #6263
7 years ago
Evan You
61187596b9
feat(core): $attrs, $listeners & inheritAttrs option
New features intended for easier creation of higher-order components.
- New instance properties: $attrs & $listeners. these are essentially aliases
of $vnode.data.attrs and $vnode.data.on, but are reactive.
- New component option: inheritAttrs. Turns off the default behavior where
parent scope non-prop bindings are automatically inherited on component root
as attributes.
close #5983 .
7 years ago
Evan You
1b7ddd7a35
feat(types): expose $vnode
7 years ago
Luke Bennett
9831b403cf
Add warnHandler to allow users to set a custom warn callback, similar to errorHandler ( #5883 )
8 years ago
Melvin Lee
92d61922e9
Add TypeScript definition for ssrContext ( #5654 )
8 years ago
Async0x42
1288386722
Support Vue.delete(arr, index) in TypeScript definitions ( #5508 )
* add a variation of 'delete' to typesript typings, added in 2.2+
* add typescript typings test for Vue.delete(arr, index)
8 years ago
Bojan
1b38a261c5
support multi event ( #5056 )
8 years ago
Evan You
73c5614740
update types for new features
8 years ago
kingwl
8bb6c2bdaa
support $on multi event ( #4860 )
8 years ago
Alexander Sheboltaev
ebe27295df
typings: type-checking WatchHandler -- refining
8 years ago
Alexander Sheboltaev
c662fe09c7
typings: type-checking WatchHandler
Makes watch handler argument to be typechecked when the expression is set
as a function.
8 years ago
Evan You
5fea184d50
$props type improvements
8 years ago
yantene
ef40d1b7cf
add the type of props in typescript definitions
8 years ago
katashin
fba78d4598
Update types for new features of v2.1 ( #4305 )
* add types for scoped slots
* update nextTick types for returning promise
* improve scoped slot type
8 years ago
odangosan
35f145cfc1
Update vue.d.ts ( #4105 )
fix typo.
8 years ago
katashin
6643cb8c23
Update typings ( #3876 )
* ensure `this` in methods is vue component
* update createElement type and expose it
8 years ago
Kaorun343
ef6945932f
Fix $createElement and Vue.extend ( #3818 )
* Fix $createElement and extend
* Add AsyncComponent
8 years ago
(´・ω・`)
aefb34812e
Update `$refs` type declaration ( #3765 )
* `$refs` is a dictionary of Vue instance or Element
* update $refs for array usage
8 years ago
Kaorun343
2b588b754e
Update ComponentOptions ( #3651 )
* Update ComponentOptions
* Make ComponentOptions as a Generic Interface
* Update some interfaces and types related to ComponentOptions
* Update tests
* Fix
8 years ago
Kaorun343
d2337dfc3f
remove ".d" from paths ( #3607 )
8 years ago
Kaorun343
8f4aab201b
Fix definitons ( #3591 )
* Fix types
* add “FunctionalComponentOptions” and “ContextObject”
* fix and update types
* Rename
* Update vue.d.ts
* Update options-test.ts
8 years ago
wumingyang
4061c42748
adapt index.d.ts for end users ( #3582 )
* adapt index.d.ts for end users
* fix extend return type
8 years ago
kaorun343
dfc64e8a11
Add TypeScript definitions
Add TypeScript definition
Remove unnecessary definition
Update definitions
* separate files
* remove unnecessary `{[key: string]: any}`
* from singular to plural
Update definitions
* Add more definitions
* Rename filename and interface
* Sort definitions
* Fix indent
Fix
Add test
* add test
* fix some definitions
* fix typo
Fix ComputedOptions
Update Vue.set
Update definitions
Add npm script
8 years ago