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

Typescript Extension: Provide public API-surface for extension authors #28912

Closed
mrcrowl opened this issue Jun 16, 2017 · 1 comment
Closed
Assignees
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code

Comments

@mrcrowl
Copy link

mrcrowl commented Jun 16, 2017

As an extension author, I'd like access to the same typescript client that is contained within the built-in typescript extension.

Some examples of useful APIs below:

/// [typescriptMain.ts]

export function activate(context: ExtensionContext): DependentExtensionAPI {
    ...

    return {
        // --> typescriptServiceClient.execute
        clientExecute(command: string, args: any, expectsResultOrToken?: boolean | CancellationToken): Promise<any> 

        // --> taskProvider.getTsConfigForActiveFile
        getTsConfigForActiveFile(): Promise<string>
    }
}

export interface DependentExtensionAPI 
{
    clientExecute(command: 'configure', args: Proto.ConfigureRequestArguments, token?: CancellationToken): Promise<Proto.ConfigureResponse>;
    clientExecute(command: 'open', args: Proto.OpenRequestArgs, expectedResult: boolean, token?: CancellationToken): Promise<any>;
    clientExecute(command: 'close', args: Proto.FileRequestArgs, expectedResult: boolean, token?: CancellationToken): Promise<any>;
    clientExecute(command: 'change', args: Proto.ChangeRequestArgs, expectedResult: boolean, token?: CancellationToken): Promise<any>;
    clientExecute(command: 'geterr', args: Proto.GeterrRequestArgs, expectedResult: boolean, token?: CancellationToken): Promise<any>;
    clientExecute(command: 'quickinfo', args: Proto.FileLocationRequestArgs, token?: CancellationToken): Promise<Proto.QuickInfoResponse>;
    clientExecute(command: 'completions', args: Proto.CompletionsRequestArgs, token?: CancellationToken): Promise<Proto.CompletionsResponse>;
    ...
    getTsConfigForActiveFile(): Promise<string>;
}

@dbaeumer

@mjbvz
Copy link
Collaborator

mjbvz commented Dec 19, 2017

Closing as out of scope. If you still think you need some additional data or functionality from TS, please explain what you are trying to achieve and we can work back from there

@mjbvz mjbvz closed this as completed Dec 19, 2017
@mjbvz mjbvz added the *out-of-scope Posted issue is not in scope of VS Code label Dec 19, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants