Closed silbinarywolf closed 5 years ago
@mattsjones Mind giving this a review? I'm not sure how to get robust tests on this logic without having TypeScript as a dep and actually running it through the type-checker :/
TypeScript doesn't seem to like this. Here's a playground link that throws an error for this definition.
Huh that's interesting. Cheers.
We're running that exact version right now and I didn't see such an error come up when I manually tested this with *.d.ts
files. I tweaked the playground to closer match what we do but it still gets errors.
This signals to me that merging this in would be a bad idea, though I don't understand why it's working with our build system. (Not that crazy, Webpack + ts-loader + TypeScript outputting ES5)
I'll close this for the time-being until I figure out a better solution.
feat: add compile-time checking for selectors that don't exist when using index signature syntax, ie. a['my-selector']