You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeTableName='t1'|'t2';typeColumnName='id'|'value';typeTableColumn= `${TableName}.${ColumnName}`;typeJoin={on: Partial<Record<TableColumn,TableColumn>>;};consttest: Join={on: {// Trigger autocomplete inside the object}};
🙁 Actual behavior
The key is inserted using double quotes (e.g., "t1.id": ...), overriding the user's preference for single quotes.
🙂 Expected behavior
The key should be inserted using the quote style defined in the editor's preferences (e.g., single quotes if 'single' is selected).
Additional information about the issue
When using template literal types as keys in a Record or object mapping, the TypeScript language service's autocomplete functionality consistently forces double quotes (") when inserting the suggested keys, regardless of the user's configured javascript.preferences.quoteStyle or typescript.preferences.quoteStyle settings.
TS.quote.issue.mp4
This behavior is inconsistent with how standard string keys or property names are handled and complicates code consistency when working with complex template literal types in type-safe mappings.
🔎 Search Terms
List of keywords : "double", "quote", "preference", "style", "autcomplete", "template", "literral"
🕗 Version & Regression Information
TS Version : 6.0.3 or 7.0-rc
⏯ Playground Link
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAKghgIwDYQHJwLbQLxQOTACMeUAPvsAEx4DcAUKJFAMID2SArhgHbpZS48ASwAmJcngBucThFoNw0eMghtOPAVAAGAEgDeylHwgBfAHT61XXplNb6jaAClWQ7pr10oUVtwBcUAAKcABOwEIyADwAShAAxqwhIpGGquzWADSwiChWPAB8+fQm9AncAM7AUMAQlQEubh5ePv5Qnt5QzSZ0JUA
💻 Code
🙁 Actual behavior
The key is inserted using double quotes (e.g., "t1.id": ...), overriding the user's preference for single quotes.
🙂 Expected behavior
The key should be inserted using the quote style defined in the editor's preferences (e.g., single quotes if 'single' is selected).
Additional information about the issue
When using template literal types as keys in a Record or object mapping, the TypeScript language service's autocomplete functionality consistently forces double quotes (") when inserting the suggested keys, regardless of the user's configured javascript.preferences.quoteStyle or typescript.preferences.quoteStyle settings.
TS.quote.issue.mp4
This behavior is inconsistent with how standard string keys or property names are handled and complicates code consistency when working with complex template literal types in type-safe mappings.