File tree 4 files changed +55
-6
lines changed
4 files changed +55
-6
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ require ( "../lib/cli" ) ;
Original file line number Diff line number Diff line change 1
- #!/usr/bin/env node
2
-
3
- require ( "./lib/cli" ) ;
1
+ module . exports = require ( "./lib/lib" ) ;
Original file line number Diff line number Diff line change 2
2
"name" : " typescript-formatter" ,
3
3
"version" : " 0.1.1" ,
4
4
"description" : " Formatter of TypeScript code" ,
5
- "main" : " index.js " ,
5
+ "main" : " ./index " ,
6
6
"bin" : {
7
- "tsfmt" : " ./index.js "
7
+ "tsfmt" : " ./bin/tsfmt "
8
8
},
9
9
"scripts" : {
10
10
"build" : " grunt default" ,
45
45
"grunt-exec" : " 0.4.5" ,
46
46
"matchdep" : " 0.3.0"
47
47
}
48
- }
48
+ }
Original file line number Diff line number Diff line change
1
+ declare module "typescript-formatter" {
2
+ interface IOptions {
3
+ // default false
4
+ dryRun ?: boolean ;
5
+ // default false
6
+ verbose ?: boolean ;
7
+ // default false
8
+ replace : boolean ;
9
+ // default true
10
+ tslint : boolean ;
11
+ // default true
12
+ editorconfig : boolean ;
13
+ // default true
14
+ tsfmt : boolean ;
15
+ }
16
+ interface IResultMap {
17
+ [ fileName : string ] : IResult ;
18
+ }
19
+ interface IResult {
20
+ fileName : string ;
21
+ options : TypeScript . Services . FormatCodeOptions ;
22
+ src : string ;
23
+ dest : string ;
24
+ }
25
+
26
+ function processFiles ( files : string [ ] , opts : IOptions ) : IResultMap ;
27
+
28
+ module TypeScript . Services {
29
+ class EditorOptions {
30
+ public IndentSize : number ;
31
+ public TabSize : number ;
32
+ public NewLineCharacter : string ;
33
+ public ConvertTabsToSpaces : boolean ;
34
+ static clone ( objectToClone : EditorOptions ) : EditorOptions ;
35
+ }
36
+ class FormatCodeOptions extends EditorOptions {
37
+ public InsertSpaceAfterCommaDelimiter : boolean ;
38
+ public InsertSpaceAfterSemicolonInForStatements : boolean ;
39
+ public InsertSpaceBeforeAndAfterBinaryOperators : boolean ;
40
+ public InsertSpaceAfterKeywordsInControlFlowStatements : boolean ;
41
+ public InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean ;
42
+ public InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean ;
43
+ public PlaceOpenBraceOnNewLineForFunctions : boolean ;
44
+ public PlaceOpenBraceOnNewLineForControlBlocks : boolean ;
45
+ static clone ( objectToClone : FormatCodeOptions ) : FormatCodeOptions ;
46
+ }
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments