4 ms·
I mean, the design doc is wrong. Instead of Object.defineProperty(HeaderImpl, "name", { value: "Header" }); you can just use export let Header = class He
by spion 6y ago
I mean, the design doc is wrong. Instead of
Object.defineProperty(HeaderImpl, "name", { value: "Header" });
you can just use
export let Header = class Header { }
to avoid creating a conflict between the header type declaration and this header implementation, since that way the type will be locally constrained to the class expression and only the variable gets out.
> Who knows if this kicks Header out of some optimization path in V8
It doesn't.
---
Forgive me for being suspicious of the whole thing because a couple of the rationalizations don't make sense, I'm sure there are some valid points raised there.