Sebastian Krüger
c52427b0d2
fix(types): async Component types ( #11906 )
* Update options.d.ts
* Create async-component-test.ts
* add generics to Component ad EsModuleComponent
* remove not needed , and ;
* revert unrelated changes
* revert unrelated changes
* revert unrelated changes
* revert unrelated changes
* optimize EsModuleImports
* Update async-component-test.ts
4 years ago
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
Zen
5c459f0fd6
fix(types): allow symbol & boolean for vnode key ( #11914 )
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
Kawokas
7c75462354
fix(types): changed expression type to optional string ( #11189 )
fix #10871
4 years ago
Orkhan Alikhanov
668e1e6374
fix(types): allow string for watch handlers in options ( #10396 )
* Allow watch handler to be string as it is supported
* Move string type to WatchHandler itself
* Removed string type as it moved to WatchHandler
4 years ago
warmsocks
8ead9d2a0d
chore: spelling and grammar ( #11481 )
Co-authored-by: Shaun Case <shaunc@aja.com>
4 years ago
katashin
4821149b8b
fix(types): fix prop constructor type inference ( #10779 )
5 years ago
katashin
ab50e8e1da
fix(types): fix global namespace declaration for UMD bundle ( #9912 )
6 years ago
Evan You
ea113d2618
test: separate failing test for TS 3.4
6 years ago
Carlos Rodrigues
df4af4bd19
fix(types): allow using functions on the PropTypes ( #9733 )
close #9692
6 years ago
Vitor Luiz Cavalcanti
982d5a492f
fix(types): support string type for style in VNode data ( #9728 )
fix #9727
6 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
dbc0582587
feat: dynamic directive arguments for v-on, v-bind and custom directives ( #9373 )
6 years ago
Evan You
42fdf3f837
refactor: ssrPrefetch -> serverPrefetch for more consistent naming
6 years ago
Evan You
0cf6aaddb5
types: type sync for 2.6 features
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
Eduardo San Martin Morote
fb6aa06090
feat(functional): add scopedSlots to context in functional components ( #7941 )
6 years ago
Guillaume Chau
d7a533d6f8
feat(ssr): ssrPrefetch option + context.rendered hook ( #9017 )
6 years ago
Ferdy Budhidharma
57910723c6
feat(types): add Prop to main type declaration file ( #6856 )
close #6850
6 years ago
Kael
d780dd2e2a
fix(types): accept primatives and falsy values in createElement children ( #9154 )
fixes #8498
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
Timur Kiyui
dfaf9e2436
fix(types): type support for advanced async components ( #8438 )
6 years ago
Kael
448ba65d2b
fix(types): correct scopedSlot types ( #9131 )
see #8946
6 years ago
James George
b0ccb86183
chore: rephrase comment ( #9100 )
6 years ago
Julian Rüth
f43ae6d151
chore(typo): fix typo ( #9085 )
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
st-sloth
ac217d2472
fix(types): fix `renderError`arguments type ( #8636 )
fix #8635
6 years ago
狼族小狈
c711ec189a
fix(types): support chain call for Vue.use and Vue.mixin ( #8595 )
6 years ago
Kael
bfd722bb5d
types: add refInFor to VNodeData ( #8229 )
6 years ago
Eduardo San Martin Morote
496635e7c9
types: add model option to functional components ( #8212 )
Closes #8210
6 years ago
Zev Goldstein
bf2e2ed159
types: allow functional components to return multiple VNodes ( #8192 )
close #8191
6 years ago
Kael
99a51b452f
fix(types): make VNodeDirective properties optional, fix #8013 ( #8003 )
6 years ago
katashin
a9eb198413
fix(types): relax the return type of props default option ( #8537 )
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
Ryan Cavanaugh
49385e1efa
types: add UMD global declaration to index.d.ts ( #7868 )
Users using Vue from e.g. the CDN might be using the global `.Vue` without importing the module.
See https://www.typescriptlang.org/docs/handbook/modules.html for details on the syntax
7 years ago
Herrington Darkholme
144bf5a99e
fix(types): prefer normal component over functional one ( #7687 )
7 years ago
katashin
6b8516b2dd
fix(types): fix wrong errorCaptured type ( #7712 )
7 years ago
katashin
b2092dbff9
fix(types): make render option in functional components to optional ( #7663 )
7 years ago
katashin
db1b18ceec
fix(types): add missing `listeners` type on RenderContext ( #7584 )
7 years ago
Pig Fang
2d168f1ba1
test(types): update TS version and fix types test ( #7597 )
7 years ago
Herrington Darkholme
6ee684983b
fix(types): contravariant generic default in ComponentOption ( #7369 )
7 years ago