Skip to content
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

Allow custom ways to dynamically infer function return types #20242

Closed
ronami opened this issue Nov 23, 2017 · 2 comments
Closed

Allow custom ways to dynamically infer function return types #20242

ronami opened this issue Nov 23, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@ronami
Copy link

ronami commented Nov 23, 2017

Hey,

I'm using monaco-editor to create my own custom IDE. I know typescriptServices is running in a web worker and provides intellisense. I want to be able to tell the intellisense engine to behave differently on some occasions. Something equivalent to Tern's server plugin's: infer.registerFunction.

My specific use-case is that I have a function that accepts a string and returns different types based on that string. I want to be able to tell the the intellisense engine, at runtime, that the return value for $('button1') is of type button.

Is there an API for this? Any workaround?

Thanks!

@mhegazy
Copy link
Contributor

mhegazy commented Nov 27, 2017

Looks like the same request as in #3136

@mhegazy mhegazy added the Duplicate An existing issue was already created label Nov 27, 2017
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants