Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POC: Wrap bridged types to throw when called as a function
For Khan#25: This shows how we might wrap the constructors so that they throw when called without `new`. In this example, I've hardcoded `TextLayer` as the only wrapped type, but we'd presumably want to wrap every instantiable type. When you call a type without `new`, you now get a protonope, as you might expect. (It always says line 5 though since that's where the `new Error()` call is in the wrap script -- not sure how to fix that easily.)
- Loading branch information