Answers for "typescript empty object properties"

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

Code answers related to "typescript empty object properties"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language