emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/typescript-mode 5e0b9ee095 168/222: Add a test that fails


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 5e0b9ee095 168/222: Add a test that fails without the following indentation fix.
Date: Sun, 6 Feb 2022 16:59:29 -0500 (EST)

branch: elpa/typescript-mode
commit 5e0b9ee095990b936b3e0e73a9db1608d971f448
Author: Louis-Dominique Dubeau <ldd@lddubeau.com>
Commit: Louis-Dominique Dubeau <ldd@lddubeau.com>

    Add a test that fails without the following indentation fix.
---
 test-files/indentation-reference-document.ts | 54 ++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/test-files/indentation-reference-document.ts 
b/test-files/indentation-reference-document.ts
index dac6ab9430..60b3296497 100644
--- a/test-files/indentation-reference-document.ts
+++ b/test-files/indentation-reference-document.ts
@@ -663,3 +663,57 @@ let $img2: JQuery<HTMLImageElement> = null
 if (variable != null) {
     //
 }
+
+// The following block deals with strings of member expressions on so-called
+// "fluent" APIs.
+interface Fnord {
+    log(...args: any[]): this;
+    blah(): this;
+}
+
+let fnord: Fnord = {} as any;
+
+{
+    fnord
+        .log("sdf")
+        .blah();
+
+    const m =
+        fnord
+            .log()
+            .blah();
+
+    const b = { q: 1, f: 2}
+
+    const x =
+        fnord
+            .log({ a: b.q, z: b.f })
+            .blah();
+
+    (async () => {
+        const x = (
+            await (fnord as any)
+                .log(1));
+    })();
+}
+
+fnord
+    .log("sdf")
+    .blah();
+
+const m =
+    fnord
+        .log()
+        .blah();
+
+fnord
+    .log("sdf")
+
+const q =
+    fnord
+        .log();
+
+// This is a continued expression in parentheses.
+const blip999 = (window.location.href === "fnord" ?
+    "a" :
+    "b");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]