Typescript Errors How do I ignore the error property does not exist on value of type

0 votes

In VS2013 building stops when tsc exits with code 1. This was not the case in VS2012.

How do I handle the tsc.exe error?

I get many `The property 'x' does not exist on value of type 'y'` errors, which I want to ignore when using JS functions.

May 31 in TypeSript by Logan
• 2,140 points
473 views

1 answer to this question.

0 votes

The easiest solution to this is:

(y as any).x

This cast is explicit so it will compile even with noImplicitAny flag set.

answered May 31 by Nina
• 3,020 points

Related Questions In TypeSript

0 votes
1 answer
0 votes
1 answer

What is "not assignable to parameter of type never" error in TypeScript?

All you have to do is define ...READ MORE

answered May 31 in TypeSript by Nina
• 3,020 points
869 views
0 votes
1 answer
0 votes
1 answer

Now I know what 'pick' does. But I want to do the opposite and remove values from an object.

You can use the keyword Omit for ...READ MORE

answered May 27 in TypeSript by Nina
• 3,020 points
20 views
0 votes
1 answer

Mixing JavaScript and TypeScript in Node.js

Combine the following TypeScript compiler options --allowJs Explicitly supports ...READ MORE

answered Jun 15 in TypeSript by Nina
• 3,020 points
12 views
0 votes
0 answers

Typescript open-api cilent generation and usage of `fetch`

I am trying to generate a typescript ...READ MORE

Jul 18 in TypeSript by Logan
• 2,140 points
25 views
0 votes
1 answer

Start script missing error when running npm start

It seems that there is an undefined ...READ MORE

answered Feb 10 in Java by Soham
• 8,740 points
2,223 views
0 votes
1 answer

TypeScript Object assign gives me an error property assign does not exist on type ObjectConstructor

For TypeScript 2.1 and higher, you can ...READ MORE

answered May 31 in TypeSript by Nina
• 3,020 points
71 views
0 votes
1 answer

Typescript: Property "XXX" does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes

Double check the newly added object types. ...READ MORE

answered Jun 8 in TypeSript by Nina
• 3,020 points
2,666 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP