Andrew Branch

Results 261 comments of Andrew Branch

@kbalint it sounds like you need ```diff - type HubConnection = typeof import("../typed/src/HubConnection").HubConnection; + type HubConnection = import("../typed/src/HubConnection").HubConnection; ```

There is some work in flight to begin making sense of `--module none`: #48702 (#48790). The new `--moduleDetection` flag may also make this issue more tractable, as a lot of...

> _maybe_ we can consider removing the module marker from the output JS in that mode Actually, it seems like this was discussed at https://github.com/microsoft/TypeScript/issues/47724 and the conclusion was “Ugh.”

I don’t understand. If you just use the syntax `type Whatever = import("./foo").Whatever`, we analyze the file as a global script. This means - Top-level declarations are correctly marked as...

The PR that caused the behavior change was #48668. Taking a closer look at @RyanCavanaugh’s simplified repro, it’s not so clear to me what the expected behavior really should be....

A possible rebuttal of my analysis that I thought about but forgot to address: you might say that getting a property of a contextual type is fuzzier and more permissive...

Hmm, I actually think Ryan’s simplified repro may have simplified too far: in the simplification, the first intersection constituent was an object with an index signature, whereas in the real...

[Simplified a little less:](https://www.typescriptlang.org/play?ts=4.8.0-beta#code/C4TwDgpgBAygNgSwMYQMIEMDOEBKEAmArigE6YA8Mw6wEAfFALxQDeAUFJ1ANoDSAXFEzASCAHYBzALqCAFMJoRBVRQEomDFbSgAfKADcA9gnwBuNgF9zbUJCgA1dInyL4yNFlwFiEMpQA0UACCqDhQEAAetGL4mLCIKBjYeESkFDB0DMwhYQBkrBxc3AAqUOJQsgDWECCGAGbBoaoyjTglUuFREDFx7Fz9UCTepPLKgehIwAiGYgD8guJ1vsGqguhiIOb9FlCzBQNcYENg6EOyAHSX6IJiEPq+3FKrUADyALYIwORBgQDkthBfnQtlwdoIWFZLNZ8BAkHBTtA6oQxJNpmIoEghq4EhBKNRaIEkl5Ur44pForF4u4iSkfH4tPQ6LJCoYwFMZphwYVOOJPggnAzlPjoHpZLJ1IxNMLVCDOEMSWRBI5nNjqZ5aWk8YpCerhqTgYULGxnkYTNZImBDCRgBiOTa4QhusA3CgmBisbQXRBZOwAJC8qYC4Vc32+wjYEhidBvJRQABEcf8bFDCEwABlDBIJAQAJJiQR1JzYJOh8O+HP4QQJku+9D6GinKuJ5MWEvyumcgqhmaoRBOgCqEdQAAt1tn8PJpV3QwB6GdQS7nZO+1stywyoA) ```ts type SliceCaseReducers = { [K: string]: (state: State) => State | void; }; type ValidateSliceCaseReducers = ACR & { [T in (keyof ACR)]: ACR[T] extends...

> But in the actual redux-toolkit types, I can remove the constraint to the index signature and the behavior looks the same. I was wrong about this. Minimal repro with...