documentation
documentation copied to clipboard
[ Bug report ] TypeScript / JavaScript whitespace
Required
What is the issue?
When switching between TypeScript/JavaScript code samples, I've noticed that TypeScript uses 4 spaces , whereas JavaScript only uses 2 spaces .
How can we reproduce the issue?
For example, on this page.
TypeScript
const handle = await client.start(example, {
taskQueue: 'search-attributes',
workflowId: 'search-attributes-example-0',
searchAttributes: {
CustomIntField: [2],
CustomKeywordField: ['keywordA', 'keywordB'],
CustomBoolField: [true],
CustomDatetimeField: [new Date()],
CustomStringField: [
'String field is for text. When queried, it will be tokenized for partial match. StringTypeField cannot be used in Order By',
],
},
});
const { searchAttributes } = await handle.describe();
JavaScript
const handle = await client.start(example, {
taskQueue: 'search-attributes',
workflowId: 'search-attributes-example-0',
searchAttributes: {
CustomIntField: [2],
CustomKeywordField: ['keywordA', 'keywordB'],
CustomBoolField: [true],
CustomDatetimeField: [new Date()],
CustomStringField: [
'String field is for text. When queried, it will be tokenized for partial match. StringTypeField cannot be used in Order By',
],
},
});
const { searchAttributes } = await handle.describe();
Because of that, it appears that TypeScript isn't hightlighting the "keys" or var names and JavaScript does.
What is the expected behavior?
Additional context (optional—the more we know, the faster it goes)
Screenshots:
TypeScript
JavaScript
It's due to the snippet comment not starting indented:

@vkarpov15 are you up for looking at removing the indentation? Related: #1379