Permalink
Browse files

Add test folder.

Copy of demo code.
  • Loading branch information...
1 parent 5daa337 commit 87d361fc169be9d720932157ea673e299500edf8 @tansongyang tansongyang committed with marijnh Oct 13, 2015
Showing with 28 additions and 0 deletions.
  1. +3 −0 test/demo/simple/.tern-project
  2. +25 −0 test/demo/simple/test.js
@@ -0,0 +1,3 @@
+{
+ "libs": ["browser"]
+}
@@ -0,0 +1,25 @@
+// Use ctrl-space to complete something
+co
+document.body.a
+
+// Put the cursor in or after an expression, press alt-o to
+// find its type
+
+var foo = ["array", "of", "strings"]
+var bar = foo.slice(0, 2).join("").split("a")[0]
+
+// Works for locally defined types too.
+
+function CTor() { this.size = 10 }
+CTor.prototype.hallo = "hallo"
+
+var baz = new CTor
+baz.
+
+// You can press alt-space when the cursor is on a variable
+// name to rename it. Try it with CTor...
+
+// When the cursor is in an argument list, the arguments
+// are shown below the editor.
+
+[1].reduce( )

0 comments on commit 87d361f

Please sign in to comment.