Answers for "what will the type of empty object in typescript"

2

how to create empty object typescript

const _params = {} as any;

 _params.name ='nazeh abel'
Posted by: Guest on May-26-2020
0

empty object typescript

type EmptyObject = {
    [K in any] : never
}

const one: EmptyObject = {}; // yes ok
const two: EmptyObject = {a: 1}; // error
Posted by: Guest on October-13-2021
0

what will the type of empty object in typescript

const user : User | Record<string, never> = {};
Posted by: Guest on April-29-2022

Code answers related to "what will the type of empty object in typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language