-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Fix string completions depending on contextual signatures #52717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/// <reference path="fourslash.ts" /> | ||
// @strict: true | ||
//// | ||
//// type ActorRef<TEvent extends { type: string }> = { | ||
//// send: (ev: TEvent) => void | ||
//// } | ||
//// | ||
//// type Action<TContext> = { | ||
//// (ctx: TContext): void | ||
//// } | ||
//// | ||
//// type Config<TContext> = { | ||
//// entry: Action<TContext> | ||
//// } | ||
//// | ||
//// declare function createMachine<TContext>(config: Config<TContext>): void | ||
//// | ||
//// type EventFrom<T> = T extends ActorRef<infer TEvent> ? TEvent : { type: 'HAHAHA' } | ||
//// | ||
//// declare function sendTo< | ||
//// TContext, | ||
//// TActor extends ActorRef<any> | ||
//// >( | ||
//// actor: ((ctx: TContext) => TActor), | ||
//// event: EventFrom<TActor> | ||
//// ): Action<TContext> | ||
//// | ||
//// createMachine<{ | ||
//// child: ActorRef<{ type: "EVENT" }>; | ||
//// }>({ | ||
//// entry: sendTo((ctx) => ctx.child, { type: /*1*/ }), | ||
//// }); | ||
//// | ||
//// createMachine<{ | ||
//// child: ActorRef<{ type: "EVENT" }>; | ||
//// }>({ | ||
//// entry: sendTo((ctx) => ctx.child, { type: "/*2*/" }), | ||
//// }); | ||
|
||
verify.completions({ marker: "1", includes: [`"EVENT"`] }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one was already working since the omitted node~ was already producing |
||
verify.completions({ marker: "2", exact: [`EVENT`] }) |
Uh oh!
There was an error while loading. Please reload this page.