brianc / node-pg-types

Type parsing for node-postgres
267 stars 54 forks source link

Ensure non-const enum in TypeScript declarations is backed by an object #120

Closed charmander closed 4 years ago

charmander commented 4 years ago

Fixes #116. Someone more familiar with TypeScript should probably confirm whether this is correct.

bendrucker commented 4 years ago

🙏 Awesome, given that there's coverage for that in https://github.com/brianc/node-pg-types/blob/master/index.test-d.ts it seems like this has to be right. Presumably a test in TS that tried to access TypeId earlier would have failed.