@@ -14,6 +14,7 @@ interface DtsCreatorOptions {
1414 searchDir ?: string ;
1515 outDir ?: string ;
1616 camelCase ?: CamelCaseOption ;
17+ singleQuote ?: boolean ;
1718 dropExtension ?: boolean ;
1819 EOL ?: string ;
1920 loaderPlugins ?: Plugin < any > [ ] ;
@@ -26,6 +27,7 @@ export class DtsCreator {
2627 private loader : FileSystemLoader ;
2728 private inputDirectory : string ;
2829 private outputDirectory : string ;
30+ private singleQuote ?: boolean ;
2931 private camelCase : boolean | 'dashes' | undefined ;
3032 private dropExtension : boolean ;
3133 private EOL : string ;
@@ -38,6 +40,7 @@ export class DtsCreator {
3840 this . loader = new FileSystemLoader ( this . rootDir , options . loaderPlugins ) ;
3941 this . inputDirectory = path . join ( this . rootDir , this . searchDir ) ;
4042 this . outputDirectory = path . join ( this . rootDir , this . outDir ) ;
43+ this . singleQuote = options . singleQuote ;
4144 this . camelCase = options . camelCase ;
4245 this . dropExtension = ! ! options . dropExtension ;
4346 this . EOL = options . EOL || os . EOL ;
@@ -63,10 +66,11 @@ export class DtsCreator {
6366
6467 const result = keys
6568 . map ( k => convertKey ( k ) )
66- . map ( k => ' readonly "' + k + '" : string;' )
69+ . map ( k => ` readonly ${ k . includes ( '-' ) ? `" ${ k } "` : k } : string;` ) ;
6770
6871 const content = new DtsContent ( {
6972 dropExtension : this . dropExtension ,
73+ singleQuote : this . singleQuote ,
7074 rootDir : this . rootDir ,
7175 searchDir : this . searchDir ,
7276 outDir : this . outDir ,
0 commit comments