File tree Expand file tree Collapse file tree 4 files changed +596
-580
lines changed Expand file tree Collapse file tree 4 files changed +596
-580
lines changed Original file line number Diff line number Diff line change 59
59
]
60
60
},
61
61
"dependencies" : {
62
- "debug" : " 2.5 .1" ,
63
- "lodash" : " 4.17.2 " ,
64
- "tslint-config-standard" : " 2 .0.0"
62
+ "debug" : " ^2.6 .1" ,
63
+ "lodash" : " ^ 4.17.4 " ,
64
+ "tslint-config-standard" : " ^4 .0.0"
65
65
},
66
66
"devDependencies" : {
67
67
"@types/chai" : " 3.4.34" ,
68
68
"@types/debug" : " 0.0.29" ,
69
- "@types/lodash" : " 4.14.44 " ,
70
- "@types/node" : " 6 .0.52 " ,
69
+ "@types/lodash" : " ^ 4.14.52 " ,
70
+ "@types/node" : " ^7 .0.5 " ,
71
71
"@types/power-assert" : " 1.4.29" ,
72
- "ava" : " 0.17.0 " ,
72
+ "ava" : " ^0.18.1 " ,
73
73
"chai" : " 3.5.0" ,
74
74
"coveralls" : " ^2.11.15" ,
75
- "nyc" : " 10.0.0 " ,
75
+ "nyc" : " ^ 10.1.2 " ,
76
76
"power-assert" : " 1.4.2" ,
77
- "snyk" : " 1.22.1 " ,
78
- "ts-node" : " 1.7.2 " ,
79
- "tslint" : " 4.1.1 " ,
80
- "typescript" : " 2.1.4 "
77
+ "snyk" : " ^1.25.0 " ,
78
+ "ts-node" : " ^2.1.0 " ,
79
+ "tslint" : " ^4.4.2 " ,
80
+ "typescript" : " ^ 2.1.6 "
81
81
}
82
82
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* Example of simple function
3
3
*/
4
- export function add ( a , b ) : Number {
4
+ export function add ( a , b ) : Number {
5
5
return ( a + b )
6
6
}
7
7
8
8
/**
9
9
* Example of using the spread operator
10
10
*/
11
- export function clone ( obj : Object ) : Object {
11
+ export function clone ( obj : Object ) : Object {
12
12
let copy = { ...obj }
13
13
return copy
14
14
}
@@ -17,23 +17,23 @@ export function clone(obj: Object): Object {
17
17
* Example of using getters/setters
18
18
*/
19
19
export class GetterSetter {
20
- private _val
20
+ private _val
21
21
22
- get bar ( ) {
23
- return `Hello ${ this . _val } `
24
- }
22
+ get bar ( ) {
23
+ return `Hello ${ this . _val } `
24
+ }
25
25
26
- set bar ( val ) {
27
- this . _val = val
28
- }
26
+ set bar ( val ) {
27
+ this . _val = val
28
+ }
29
29
}
30
30
31
31
export class GenericsExample1 < T > {
32
- value : T
33
- setValue ( value : T ) {
34
- this . value = value
35
- }
36
- getValue ( ) : T {
37
- return this . value
38
- }
32
+ value : T
33
+ setValue ( value : T ) {
34
+ this . value = value
35
+ }
36
+ getValue ( ) : T {
37
+ return this . value
38
+ }
39
39
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : [" tslint-config-standard" ],
3
3
"rules" : {
4
- "indent" : [true ,
5
- " spaces"
6
- ],
4
+ "indent" : [" error" , 2 ],
7
5
"member-access" : [false ,
8
6
" check-accessor"
9
7
],
You can’t perform that action at this time.
0 commit comments