File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ const DEFAULT_CONFIG = {
2929 'ruby' ,
3030 'rust' ,
3131 'scala' ,
32- 'swift'
32+ 'swift' ,
33+ 'typescript'
3334 ] ,
3435 urls : {
3536 // base urls
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ const LANGS = [
4545 { lang : 'ruby' , ext : '.rb' , style : '#' } ,
4646 { lang : 'rust' , ext : '.rs' , style : 'c' } ,
4747 { lang : 'scala' , ext : '.scala' , style : 'c' } ,
48- { lang : 'swift' , ext : '.swift' , style : 'c' }
48+ { lang : 'swift' , ext : '.swift' , style : 'c' } ,
49+ { lang : 'typescript' , ext : '.ts' , style : 'c' }
4950] ;
5051
5152const h = { } ;
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ describe('helper', function() {
136136 assert . equal ( h . langToExt ( 'scala' ) , '.scala' ) ;
137137 assert . equal ( h . langToExt ( 'swift' ) , '.swift' ) ;
138138 assert . equal ( h . langToExt ( 'rust' ) , '.rs' ) ;
139+ assert . equal ( h . langToExt ( 'typescript' ) , '.ts' ) ;
139140 } ) ;
140141 } ) ; // #langToExt
141142
@@ -158,6 +159,7 @@ describe('helper', function() {
158159 assert . equal ( h . extToLang ( '~/leetcode/../file.sql' ) , 'mysql' ) ;
159160 assert . equal ( h . extToLang ( '/home/skygragon/file.dat' ) , 'unknown' ) ;
160161 assert . equal ( h . extToLang ( '~/leetcode/file.rs' ) , 'rust' ) ;
162+ assert . equal ( h . extToLang ( '~/leetcode/file.ts' ) , 'typescript' ) ;
161163 } ) ;
162164 } ) ; // #extToLang
163165
@@ -182,6 +184,7 @@ describe('helper', function() {
182184 assert . deepEqual ( h . langToCommentStyle ( 'ruby' ) , RUBY_STYLE ) ;
183185 assert . deepEqual ( h . langToCommentStyle ( 'scala' ) , C_STYLE ) ;
184186 assert . deepEqual ( h . langToCommentStyle ( 'swift' ) , C_STYLE ) ;
187+ assert . deepEqual ( h . langToCommentStyle ( 'typescript' ) , C_STYLE ) ;
185188 } ) ;
186189 } ) ; // #langToCommentStyle
187190
You can’t perform that action at this time.
0 commit comments