mpoc·3년 전·discuss"objectKeys" wrapper from https://github.com/sindresorhus/ts-extras also does this.It would be nice if the behaviour with "as const" was different: const person = { name: 'John Doe', age: 35 } as const const result = Object.keys(person) // return type is not 'name' | 'age'
It would be nice if the behaviour with "as const" was different: