UNPKG
jsctags
Version:
latest (5.2.2)
5.2.2
5.2.1
5.2.0
5.1.1
5.1.0
5.0.1
5.0.0
4.0.1
4.0.0
3.3.0
3.2.1
3.2.0
3.1.0
3.0.1
3.0.0
2.1.0
2.0.1
2.0.0
1.0.0
0.1.0
jsctags generator
github.com/ramitos/jsctags
ramitos/jsctags
jsctags
/
test
/
cases
/
ctorpattern.js
11 lines
(8 loc)
•
225 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// Verify that the binding of `this` to the top scope is overridden by
// the binding to an instance.
function
Ctor
(
) {
if
(!(
this
instanceof
Ctor
))
return
new
Ctor
();
this
.
foo
=
20
; }
Ctor
().
foo
;
//: number
foo;
//: ?