@@ -153,8 +153,8 @@ const writeFiles = function(options) {
153153 fs . writeFileSync (
154154 path . resolve ( dir , 'index.d.ts' ) ,
155155 type === 'Sequence_Property'
156- ? `const data: string[];\nexport default data;`
157- : `const aliasMap: Record<number, string[]>;\nexport default aliasMap;`
156+ ? `declare const data: string[];\nexport = data;`
157+ : `declare const aliasMap: Record<number, string[]>;\nexport = aliasMap;`
158158 ) ;
159159 return ;
160160 }
@@ -170,15 +170,15 @@ const writeFiles = function(options) {
170170 ) ;
171171 fs . writeFileSync (
172172 path . resolve ( dir , 'ranges.d.ts' ) ,
173- 'import type { UnicodeRange } from "../../decode-ranges.js";\n\nconst ranges: UnicodeRange[];\nexport default ranges;\n'
173+ 'import type { UnicodeRange } from "../../decode-ranges.js";\n\ndeclare const ranges: UnicodeRange[];\nexport = ranges;\n'
174174 ) ;
175175 fs . writeFileSync (
176176 path . resolve ( dir , 'regex.js' ) ,
177177 'module.exports=/' + regenerate ( codePoints ) . toString ( ) + '/'
178178 ) ;
179179 fs . writeFileSync (
180180 path . resolve ( dir , 'regex.d.ts' ) ,
181- 'declare const regex: RegExp;\nexport default regex;'
181+ 'declare const regex: RegExp;\nexport = regex;'
182182 ) ;
183183 if ( codePointsSizeLt ( codePoints , 10 ) ) {
184184 const codePointsAsArray = codePoints instanceof regenerate ? codePoints . toArray ( ) : codePoints ;
@@ -205,15 +205,15 @@ const writeFiles = function(options) {
205205 ) ;
206206 fs . writeFileSync (
207207 path . resolve ( dir , 'code-points.d.ts' ) ,
208- `declare const codePoints: number[];\nexport default codePoints;`
208+ `declare const codePoints: number[];\nexport = codePoints;`
209209 ) ;
210210 fs . writeFileSync (
211211 path . resolve ( dir , 'symbols.js' ) ,
212212 `module.exports=${ symbolsExports } `
213213 ) ;
214214 fs . writeFileSync (
215215 path . resolve ( dir , 'symbols.d.ts' ) ,
216- `declare const symbols: string[];\nexport default symbols;`
216+ `declare const symbols: string[];\nexport = symbols;`
217217 ) ;
218218 } ) ;
219219 if ( options . type == 'Bidi_Mirroring_Glyph' ) {
@@ -241,7 +241,7 @@ const writeFiles = function(options) {
241241 ) ;
242242 fs . writeFileSync (
243243 path . resolve ( dir , 'index.d.ts' ) ,
244- `const data: Map<number, string>;\nexport default data;`
244+ `declare const data: Map<number, string>;\nexport = data;`
245245 ) ;
246246 } else {
247247 Object . keys ( auxMap ) . forEach ( function ( type ) {
@@ -262,7 +262,7 @@ const writeFiles = function(options) {
262262 flatRuns
263263 ) } )`;
264264 fs . writeFileSync ( path . resolve ( dir , "index.js" ) , output ) ;
265- fs . writeFileSync ( path . resolve ( dir , "index.d.ts" ) , `declare const map: Map<number, string>;\nexport default map;` ) ;
265+ fs . writeFileSync ( path . resolve ( dir , "index.d.ts" ) , `declare const map: Map<number, string>;\nexport = map;` ) ;
266266 } ) ;
267267 }
268268 return dirMap ;
0 commit comments