Skip to content

String completions fail when they depend on the contextual signature #53073

Description

Bug Report

🔎 Search Terms

completions string return contextual signature

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

💻 Code

typeActorRef<TEventextends{type: string}>={send: (ev: TEvent)=>void;};typeAction<TContext>={(ctx: TContext): void;};typeConfig<TContext>={entry: Action<TContext>;};declarefunctioncreateMachine<TContext>(config: Config<TContext>): void;typeEventFrom<T>=TextendsActorRef<infer TEvent>
? TEvent
: never;declarefunctionsendTo<TContext,TActorextendsActorRef<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*/"}),});

🙁 Actual behavior

At marker 2 TypeScript fails to provide a string completion

🙂 Expected behavior

I expect the string completion at marker 2 to behave in the same way as the regular completion at marker 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions