What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-10 00:15:05
Property does not exist on type
// Solution 1: The Quick Fix // In TypeScript, we can type a function by specifying the parameter types and return types. // Similarly, we need to type our objects, so that TypeScript knows what is and isn’t allowed for our keys and values. // Qui... Add solution -
TypeScript 2021-10-09 14:14:08
define object properties typescript
interface ISomeObject { subPropertie1: string, subPropertie2: number, } interface IProperties { property1: string, property2: boolean, property3: number[], property4: ISomeObject, property5: ISomeObject[], } function (args:IProperties): vo... Add solution -
TypeScript 2021-09-15 18:29:02
typescript types for state
interface IProps { } interface IState { playOrPause?: string; } class Player extends React.Component<IProps, IState> { // ------------------------------------------^ constructor(props: IProps) { super(props); this.state = { pl... Add solution
Best helpers
Ranking is empty