Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: lib/base.ts

Issue 2434903002: Fix crash generating facades for loasd. Fix bug in how we handle TypePredicates. Add test for TypeP… (Closed)
Patch Set: Fix crash generating facades for loasd. Fix bug in how we handle TypePredicates. Add test for TypeP… Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/declaration.ts » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/base.ts
diff --git a/lib/base.ts b/lib/base.ts
index d49b56826d2ecd98b2b089999db2c8175595d55c..2f5b793e8a13473e1cdc54b2de9fc59e9a8e2d0f 100644
--- a/lib/base.ts
+++ b/lib/base.ts
@@ -249,7 +249,13 @@ export function isCallable(decl: ClassLike): boolean {
});
}
-export function copyLocation(src: ts.TextRange, dest: ts.TextRange) {
+export function copyLocation(src: ts.Node, dest: ts.Node) {
+ dest.pos = src.pos;
+ dest.end = src.end;
+ dest.parent = src.parent;
+}
+
+export function copyNodeArrayLocation(src: ts.TextRange, dest: ts.NodeArray<any>) {
dest.pos = src.pos;
dest.end = src.end;
}
« no previous file with comments | « no previous file | lib/declaration.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698