Top "Typescript3.0" questions

Tag for questions specific to new features in TypeScript 3.x. For general TypeScript questions, the correct tag is TypeScript.

'unknown' vs. 'any'

TypeScript 3.0 introduces unknown type, according to their wiki: unknown is now a reserved type name, as it is now a …

typescript typescript3.0
Typescript 3 Angular 7 StopPropagation and PreventDefault not working

I have a text input inside a div. Clicking on the input should set it to focus and stop the …

javascript angular7 event-bubbling typescript3.0
cannot find name 'require' in angular 7(typescript 3.1.3)

My question is why this error shown? ERROR in src/app/p2p/p2p.component.ts(14,16): error TS2580: Cannot …

angular typescript angular7 typescript3.0
Do I ever need explicit allowSyntheticDefaultImports if esModuleInterop is true configuring TypeScript transpilation?

I need confirmation on the following theory. According to TS docs, there are two options that can be set in …

javascript typescript webpack-4 typescript3.0
Error: Type 'void' is not assignable to type 'ReactNode'

I'm trying to get an error while calling the function, this is just for practice so I have kept everything …

javascript reactjs typescript typescript3.0 react-tsx
How to clean typescript cache?

I don't know where to look at, and typescript answer here said that it is not cached But it clearly …

typescript typescript3.0
How to define string literal union type from constants in Typescript

I know I can define string union types to restrict variables to one of the possible string values: type MyType = …

typescript string-literals typescript3.0 union-types
TypeScript 3.x: Access properties of type unknown

I read from the TypeScript documentation, that you can't access properties from the type unknown: // No property accesses, element accesses, …

typescript typescript-typings typescript3.0