diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index b4b078950c3..f1410df6421 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -130,7 +130,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "type_arguments") parent-bol typescript-ts-mode-indent-offset) ((parent-is "type_parameters") parent-bol typescript-ts-mode-indent-offset) ((parent-is ,(rx (or "variable" "lexical") "_" (or "declaration" "declarator"))) - typescript-ts-mode--anchor-decl 1) + parent-bol typescript-ts-mode-indent-offset) ((parent-is "arguments") parent-bol typescript-ts-mode-indent-offset) ((parent-is "array") parent-bol typescript-ts-mode-indent-offset) ((parent-is "formal_parameters") parent-bol typescript-ts-mode-indent-offset) diff --git a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts index 877382953c1..ef7368602d6 100644 --- a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts @@ -67,22 +67,22 @@ Name: Lexical and variable declarations =-= const foo = () => { let x = 1, - yyyy: { - [k: string | number]: string, - } = { - "foo": "foo", - "bar": "bar", - }; + yyyy: { + [k: string | number]: string, + } = { + "foo": "foo", + "bar": "bar", + }; var obar = 1, - fo: { [x: any]: any } = { - "a": 1, - "b": 2, - }; + fo: { [x: any]: any } = { + "a": 1, + "b": 2, + }; const cccc = 1, - bbb = { - "x": 0 - }, - ddddd = 0; + bbb = { + "x": 0 + }, + ddddd = 0; // First decls with value starting on same line const a = (x: string): string => { return x + x;