apache / apache/netbeans

[TS] Automatic closing bracket is missing, when inserting opening bracket

Open
#7,790 3 comments 0 reactions 0 assignees View on GitHub
kind:feature needs:triage TypeScript
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

When I type "export class Test {" and hitting enter, the editor sets the cursor into the correct position but without adding an automatic closing bracket as for JS or other languages.

### Use case/motivation

For the first thing I would suggest to do the same as for JS and later on, we can add an option to hit { and it automatically adds a closing bracket as for ( in js. So this should work for normal, array diamond (in the right context) and block brackets.

### Related issues

_No response_

### Are you willing to submit a pull request?

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the TypeScript editor with `export class Test {` followed by Enter, then compare the result with JavaScript and other language editors. Trace the existing automatic bracket behavior and define done as adding the appropriate closing bracket for normal, array-diamond, and block-bracket contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.