File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
dist /
3
+ types /
3
4
node_modules /
4
5
test /output /* -changed.svg
5
6
test /output /* -changed.html
Original file line number Diff line number Diff line change 23
23
},
24
24
"files" : [
25
25
" dist/**/*.js" ,
26
- " src/**/*.js"
26
+ " src/**/*.js" ,
27
+ " src/**/*.ts" ,
28
+ " types/**/*.d.ts"
27
29
],
28
30
"scripts" : {
29
31
"test" : " yarn test:typecheck && yarn test:lint && yarn readme:check && yarn test:mocha" ,
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ const numberFormat = memoize1<Intl.NumberFormat>(
8
8
) ;
9
9
const monthFormat = memoize1 < Intl . DateTimeFormat > (
10
10
( locale : string | string [ ] | undefined , month : "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined ) =>
11
- new Intl . DateTimeFormat ( locale , { timeZone : "UTC" , month} )
11
+ new Intl . DateTimeFormat ( locale , { timeZone : "UTC" , ... ( month && { month } ) } )
12
12
) ;
13
13
const weekdayFormat = memoize1 < Intl . DateTimeFormat > (
14
14
( locale : string | string [ ] | undefined , weekday : "long" | "short" | "narrow" | undefined ) =>
15
- new Intl . DateTimeFormat ( locale , { timeZone : "UTC" , weekday} )
15
+ new Intl . DateTimeFormat ( locale , { timeZone : "UTC" , ... ( weekday && { weekday } ) } )
16
16
) ;
17
17
18
18
export function formatNumber ( locale = "en-US" ) : ( value : any ) => string | undefined {
Original file line number Diff line number Diff line change 7
7
"stripInternal" : true ,
8
8
"outDir" : " dist" ,
9
9
"allowJs" : true ,
10
+ "declaration" : true ,
11
+ "declarationDir" : " types" ,
10
12
"resolveJsonModule" : true ,
11
13
"moduleResolution" : " node" ,
12
14
"paths" : {
You can’t perform that action at this time.
0 commit comments