File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,19 @@ describe('type inference w/ options API', () => {
269269 d ( ) : number {
270270 expectType < number > ( this . b )
271271 return this . b + 1
272+ } ,
273+ e : {
274+ get ( ) : number {
275+ expectType < number > ( this . b )
276+ expectType < number > ( this . d )
277+
278+ return this . b + this . d
279+ } ,
280+ set ( v : number ) {
281+ expectType < number > ( this . b )
282+ expectType < number > ( this . d )
283+ expectType < number > ( v )
284+ }
272285 }
273286 } ,
274287 watch : {
@@ -286,6 +299,8 @@ describe('type inference w/ options API', () => {
286299 expectType < number > ( this . c )
287300 // computed
288301 expectType < number > ( this . d )
302+ // computed get/set
303+ expectType < number > ( this . e )
289304 } ,
290305 methods : {
291306 doSomething ( ) {
@@ -297,6 +312,8 @@ describe('type inference w/ options API', () => {
297312 expectType < number > ( this . c )
298313 // computed
299314 expectType < number > ( this . d )
315+ // computed get/set
316+ expectType < number > ( this . e )
300317 } ,
301318 returnSomething ( ) {
302319 return this . a
@@ -311,6 +328,8 @@ describe('type inference w/ options API', () => {
311328 expectType < number > ( this . c )
312329 // computed
313330 expectType < number > ( this . d )
331+ // computed get/set
332+ expectType < number > ( this . e )
314333 // method
315334 expectType < ( ) => number | undefined > ( this . returnSomething )
316335 }
You can’t perform that action at this time.
0 commit comments