@@ -27,34 +27,34 @@ import type {
2727 UnionToTuple
2828} from './types.ts'
2929
30- export interface UnicodeLocaleId {
30+ interface UnicodeLocaleId {
3131 lang : UnicodeLanguageId
3232 extensions : Array < UnicodeExtension | TransformedExtension | PuExtension | OtherExtension >
3333}
3434
35- export type KV = [ string , string ] | [ string ]
35+ type KV = [ string , string ] | [ string ]
3636
37- export interface Extension {
37+ interface Extension {
3838 type : string
3939}
4040
41- export interface UnicodeExtension extends Extension {
41+ interface UnicodeExtension extends Extension {
4242 type : 'u'
4343 keywords : KV [ ]
4444 attributes : string [ ]
4545}
4646
47- export interface TransformedExtension extends Extension {
47+ interface TransformedExtension extends Extension {
4848 type : 't'
4949 fields : KV [ ]
5050 lang ?: UnicodeLanguageId
5151}
52- export interface PuExtension extends Extension {
52+ interface PuExtension extends Extension {
5353 type : 'x'
5454 value : string
5555}
5656
57- export interface OtherExtension extends Extension {
57+ interface OtherExtension extends Extension {
5858 type :
5959 | 'a'
6060 | 'b'
@@ -82,7 +82,7 @@ export interface OtherExtension extends Extension {
8282 value : string
8383}
8484
85- export interface UnicodeLanguageId {
85+ interface UnicodeLanguageId {
8686 lang : string
8787 script ?: string
8888 region ?: string
@@ -128,7 +128,7 @@ export type CheckRange<T extends unknown[], Indexes extends number[]> =
128128 Includes < Indexes , Length < T > > extends true ? true : false
129129
130130// deno-fmt-ignore
131- export type ValidCharacters <
131+ type ValidCharacters <
132132 T extends unknown [ ] ,
133133 UnionChars = Alphabets , // default alphabets
134134 Target = First < T > ,
@@ -138,7 +138,7 @@ export type ValidCharacters<
138138 ? [ Includes < UnionToTuple < UnionChars > , Target > , ...ValidCharacters < Rest , UnionChars > ]
139139 : [ ]
140140
141- export const localeErrors = /* @__PURE__ */ {
141+ const localeErrors = /* @__PURE__ */ {
142142 1 : 'missing unicode language subtag' ,
143143 2 : 'malformed unicode language subtag' ,
144144 3 : 'requires 2-3 or 5-8 alphabet lower characters' ,
@@ -215,7 +215,7 @@ export type ParseLangSubtag<
215215 */
216216// TODO: Check if the language subtag is in CLDR
217217// deno-fmt-ignore
218- export type ParseUnicodeLanguageSubtag <
218+ type ParseUnicodeLanguageSubtag <
219219 Chunk extends string ,
220220 RestChunks extends unknown [ ] = [ ] ,
221221 Chars extends unknown [ ] = StringToArray < Chunk >
@@ -249,7 +249,7 @@ export type ParseScriptSubtag<
249249 */
250250// TODO: Check if the script subtag is in CLDR
251251// deno-fmt-ignore
252- export type ParseUnicodeScriptSubtag <
252+ type ParseUnicodeScriptSubtag <
253253 Chunk extends string ,
254254 RestChunks extends unknown [ ] = [ ] ,
255255 Chars extends unknown [ ] = StringToArray < Chunk >
@@ -285,7 +285,7 @@ export type ParseRegionSubtag<
285285 */
286286// TODO: Check if the region subtag is in CLDR
287287// deno-fmt-ignore
288- export type ParseUnicodeRegionSubtag <
288+ type ParseUnicodeRegionSubtag <
289289 Chunk extends string ,
290290 RestChunks extends unknown [ ] = [ ] ,
291291 Chars extends unknown [ ] = StringToArray < Chunk > ,
@@ -578,7 +578,7 @@ type t1 = ParseUnicodeExtension<['co', 'standard']>
578578type t2 = ParseUnicodeExtension < [ 'foo' , 'bar' , 'co' , 'standard' ] >
579579
580580// deno-fmt-ignore
581- export type CollectFirstKeywords <
581+ type CollectFirstKeywords <
582582 Chunks extends unknown [ ] ,
583583 Sep extends string = '-' ,
584584 Keywords extends unknown [ ] = [ ] ,
@@ -607,7 +607,7 @@ export type CollectFirstKeywords<
607607 * (= alphanum{3,8} ;)
608608 */
609609// deno-fmt-ignore
610- export type ParseAttribute <
610+ type ParseAttribute <
611611 Chunks extends unknown [ ] ,
612612 Attributes extends unknown [ ] = [ ] ,
613613 RestChunks extends unknown [ ] = Shift < Chunks > ,
@@ -823,7 +823,7 @@ export type ParsePuExtension<
823823 : [ { type : 'x' ; value : Join < ResultExts0 , Sep > } , never , ResultExts1 ]
824824> = Result
825825
826- export type _ParsePuExtension <
826+ type _ParsePuExtension <
827827 Chunks extends unknown [ ] ,
828828 Exts extends unknown [ ] = [ ] ,
829829 Chunk extends string = Chunks [ 0 ] extends string ? Chunks [ 0 ] : never ,
0 commit comments