@@ -4,6 +4,7 @@ import { FluentResource } from "./resource.js";
44import { FluentValue , FluentNone , FluentFunction } from "./types.js" ;
55import { Message , Term , Pattern } from "./ast.js" ;
66import { NUMBER , DATETIME } from "./builtins.js" ;
7+ import { getMemoizerForLocale , IntlCache } from "./memoizer.js" ;
78
89export type TextTransform = ( text : string ) => string ;
910
@@ -22,12 +23,7 @@ export class FluentBundle {
2223 public _functions : Record < string , FluentFunction > ;
2324 public _useIsolating : boolean ;
2425 public _transform : TextTransform ;
25- public _intls = new WeakMap <
26- | typeof Intl . NumberFormat
27- | typeof Intl . DateTimeFormat
28- | typeof Intl . PluralRules ,
29- Record < string , Intl . NumberFormat | Intl . DateTimeFormat | Intl . PluralRules >
30- > ( ) ;
26+ public _intls : IntlCache ;
3127
3228 /**
3329 * Create an instance of `FluentBundle`.
@@ -78,6 +74,7 @@ export class FluentBundle {
7874 } ;
7975 this . _useIsolating = useIsolating ;
8076 this . _transform = transform ;
77+ this . _intls = getMemoizerForLocale ( locales ) ;
8178 }
8279
8380 /**
0 commit comments