File tree Expand file tree Collapse file tree 2 files changed +1
-44
lines changed Expand file tree Collapse file tree 2 files changed +1
-44
lines changed Original file line number Diff line number Diff line change @@ -5,25 +5,6 @@ import type {EvaluationContext} from '../evaluation_context';
55import type { ParsingContext } from '../parsing_context' ;
66import type { Type } from '../types' ;
77
8- declare let Intl : {
9- NumberFormat : {
10- new ( ...args : any ) : Intl$NumberFormat ;
11- } ;
12- } ;
13-
14- declare class Intl$NumberFormat {
15- constructor ( locales ?: string | string [ ] , options ?: NumberFormatOptions ) ;
16- format ( a : number ) : string ;
17- resolvedOptions ( ) : any ;
18- }
19-
20- type NumberFormatOptions = {
21- style ?: 'decimal' | 'currency' | 'percent' ;
22- currency ?: null | string ;
23- minimumFractionDigits ?: null | string ;
24- maximumFractionDigits ?: null | string ;
25- } ;
26-
278export class NumberFormat implements Expression {
289 type : Type ;
2910 number : Expression ;
Original file line number Diff line number Diff line change 1- // Flow type declarations for Intl cribbed from
2- // https://github.com/facebook/flow/issues/1270
3-
4- declare let Intl : {
5- Collator : {
6- new ( ...args : any ) : Intl$Collator ;
7- } ;
8- } ;
9-
10- declare class Intl$Collator {
11- constructor ( locales ?: string | string [ ] , options ?: CollatorOptions ) ;
12- compare ( a : string , b : string ) : number ;
13- resolvedOptions ( ) : any ;
14- }
15-
16- type CollatorOptions = {
17- localeMatcher ?: 'lookup' | 'best fit' ;
18- usage ?: 'sort' | 'search' ;
19- sensitivity ?: 'base' | 'accent' | 'case' | 'variant' ;
20- ignorePunctuation ?: boolean ;
21- numeric ?: boolean ;
22- caseFirst ?: 'upper' | 'lower' | 'false' ;
23- } ;
24-
251export class Collator {
262 locale : string | null ;
273 sensitivity : 'base' | 'accent' | 'case' | 'variant' ;
28- collator : Intl$ Collator ;
4+ collator : Intl . Collator ;
295
306 constructor ( caseSensitive : boolean , diacriticSensitive : boolean , locale : string | null ) {
317 if ( caseSensitive )
You can’t perform that action at this time.
0 commit comments