Content-Length: 323397 | pFad | https://github.com/microsoft/TypeScript/pull/24543

A9 Add autoCloseTag language service · Pull Request #24543 · microsoft/TypeScript · GitHub
Skip to content

Comments

Add autoCloseTag language service#24543

Merged
2 commits merged intomasterfrom
autoCloseTag
Jun 4, 2018
Merged

Add autoCloseTag language service#24543
2 commits merged intomasterfrom
autoCloseTag

Conversation

@ghost
Copy link

@ghost ghost commented May 31, 2018

Fixes #20811

The editor can call this service to get closing text for the current tag, or undefined if not currently in a position to close a tag (or tag already closed).

@ghost ghost force-pushed the autoCloseTag branch from 1bb95bf to f76f10b Compare June 1, 2018 15:17
return true;
}

function getAutoCloseTagAtPosition(fileName: string, position: number): string | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would make the return type an object with a newText: string property to allow us to add more info as we need in the future.

getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined;

isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
getAutoCloseTagAtPosition(fileName: string, position: number): string | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would rather this had JSX in the name.. like getJSXClosingTagAtPosition also we need to add a comment on it when it should be called.

@ghost ghost force-pushed the autoCloseTag branch from 4d18f93 to f7247f7 Compare June 1, 2018 17:35
@ghost ghost merged commit 886377f into master Jun 4, 2018
@ghost ghost deleted the autoCloseTag branch June 4, 2018 17:08
@ghost ghost mentioned this pull request Jun 7, 2018
@microsoft microsoft locked and limited conversation to collaborators Aug 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSX tag autoclosing TSServer API

1 participant









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/microsoft/TypeScript/pull/24543

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy