You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Should compile fine by inheriting same type from base abstract class
Actual behavior:
Getting error:
TS2416: Property 'method' in type 'MyRoute' is not assignable to the same property in base type 'Route'.
Type 'string' is not assignable to type '"get" | "post"'.
The text was updated successfully, but these errors were encountered:
OrkhanAlikhanov
changed the title
Extended abstract class does not satisfy requirement for property having string literal type
Extended abstract class does not satisfy requirement when defining default data without explicit type
Jul 17, 2019
OrkhanAlikhanov
changed the title
Extended abstract class does not satisfy requirement when defining default data without explicit type
Extended class does not satisfy requirement when defining default data without explicit type
Jul 17, 2019
TypeScript Version: 3.5.3
Code
Expected behavior:
Should compile fine by inheriting same type from base abstract class
Actual behavior:
Getting error:
Playground Link: http://www.typescriptlang.org/play/#code/IYIwzgLgTsDGEAJYBthjAgSgewK4QFMEBvAWACgEFRIZ4EBbAiAC2wBMAuBAcgHNmPBAB9eAB2yQeAbgoBfChRRoMAWQCeOfEQIAPQgDt2GLYRIUqTVh279BCALy8BEHvKA
The text was updated successfully, but these errors were encountered: