deepkit-framework icon indicating copy to clipboard operation
deepkit-framework copied to clipboard

ES2022 type compiler issues

Open fergusean opened this issue 3 years ago • 0 comments

I've only noticed this with Pick so far, but:

When target in tsconfig.json is set to ES2020 or ES2021, this code from the @deepkit/type tests builds the following:

const __ΩUser = ['id', 'name', 'password', 'P\'4!&4"&4#M'];
const __ΩReadUser = [() => __ΩOmit, () => __ΩUser, "password", 'n".#o!#'];
const type = (0, type_1.typeOf)([], [() => __ΩReadUser, 'n!']);

However, once changing the target to ES2022, the following is produced:

const __ΩUser = ['id', 'name', 'password', 'P\'4!&4"&4#M'];
const __ΩReadUser = ['!'];
const type = (0, type_1.typeOf)([], [() => __ΩReadUser, 'n!']);

fergusean avatar Aug 03 '22 04:08 fergusean