@@ -17,7 +17,6 @@ import type {
1717 DefineDateTimeFormat ,
1818 DefineLocaleMessage ,
1919 NumberFormat ,
20- NumberFormatResult ,
2120 RemovedIndexResources ,
2221 TranslateResult ,
2322 Translation ,
@@ -668,7 +667,7 @@ declare module 'vue' {
668667 *
669668 * @returns formatted value
670669 */
671- $n ( value : number ) : NumberFormatResult
670+ $n ( value : number ) : string
672671 /**
673672 * Number formatting
674673 *
@@ -693,21 +692,23 @@ declare module 'vue' {
693692 > (
694693 value : number ,
695694 key : Key | ResourceKeys
696- ) : NumberFormatResult
695+ ) : string
697696 /**
698697 * Number formatting
699698 *
700699 * @remarks
701700 * Overloaded `$n`. About details, see the {@link $n} remarks.
702701 *
703702 * @param value - A number value
704- * @param key - A key of number formats
705- * @param locale - A locale, optional, override locale that global scope or local scope
703+ * @param options - An options, see the {@link NumberOptions}
706704 *
707705 * @returns formatted value
708706 */
709707 $n <
710708 Key extends string = string ,
709+ Return extends string | Intl . NumberFormatPart [ ] =
710+ | string
711+ | Intl . NumberFormatPart [ ] ,
711712 DefinedNumberFormat extends
712713 RemovedIndexResources < DefineDateTimeFormat > = RemovedIndexResources < DefineDateTimeFormat > ,
713714 Keys = IsEmptyObject < DefinedNumberFormat > extends false
@@ -718,41 +719,8 @@ declare module 'vue' {
718719 ResourceKeys extends Keys = IsNever < Keys > extends false ? Keys : never
719720 > (
720721 value : number ,
721- key : Key | ResourceKeys ,
722- locale : Locale
723- ) : NumberFormatResult
724- /**
725- * Number formatting
726- *
727- * @remarks
728- * Overloaded `$n`. About details, see the {@link $n} remarks.
729- *
730- * @param value - A number value
731- * @param args - An argument values
732- *
733- * @returns formatted value
734- */
735- $n (
736- value : number ,
737- args : { [ key : string ] : string | boolean | number }
738- ) : NumberFormatResult
739- /**
740- * Number formatting
741- *
742- * @remarks
743- * Overloaded `$n`. About details, see the {@link $n} remarks.
744- *
745- * @param value - A number value
746- * @param key - A key of number formats
747- * @param args - An argument values
748- *
749- * @returns formatted value
750- */
751- $n (
752- value : number ,
753- key : string ,
754- args : { [ key : string ] : string | boolean | number }
755- ) : NumberFormatResult
722+ options : NumberOptions < Key , ResourceKeys >
723+ ) : Return
756724 /**
757725 * Number formatting
758726 *
@@ -762,35 +730,6 @@ declare module 'vue' {
762730 * @param value - A number value
763731 * @param key - A key of number formats
764732 * @param locale - A locale, optional, override locale that global scope or local scope
765- * @param args - An argument values
766- *
767- * @returns formatted value
768- */
769- $n (
770- value : number ,
771- key : string ,
772- locale : Locale ,
773- args : { [ key : string ] : string | boolean | number }
774- ) : NumberFormatResult
775- /**
776- * Number formatting
777- *
778- * @remarks
779- * Overloaded `$n`. About details, see the {@link $n} remarks.
780- *
781- * @param value - A number value
782- *
783- * @returns formatted value
784- */
785- $n ( value : number ) : string
786- /**
787- * Number formatting
788- *
789- * @remarks
790- * Overloaded `$n`. About details, see the {@link $n} remarks.
791- *
792- * @param value - A number value
793- * @param key - A key of number formats
794733 *
795734 * @returns formatted value
796735 */
@@ -806,7 +745,8 @@ declare module 'vue' {
806745 ResourceKeys extends Keys = IsNever < Keys > extends false ? Keys : never
807746 > (
808747 value : number ,
809- key : Key | ResourceKeys
748+ key : Key | ResourceKeys ,
749+ locale : Locale
810750 ) : string
811751 /**
812752 * Number formatting
@@ -815,13 +755,16 @@ declare module 'vue' {
815755 * Overloaded `$n`. About details, see the {@link $n} remarks.
816756 *
817757 * @param value - A number value
818- * @param key - A key of number formats
758+ * @param options - An options, see the { @link NumberOptions}
819759 * @param locale - A locale, optional, override locale that global scope or local scope
820760 *
821761 * @returns formatted value
822762 */
823763 $n <
824764 Key extends string = string ,
765+ Return extends string | Intl . NumberFormatPart [ ] =
766+ | string
767+ | Intl . NumberFormatPart [ ] ,
825768 DefinedNumberFormat extends
826769 RemovedIndexResources < DefineDateTimeFormat > = RemovedIndexResources < DefineDateTimeFormat > ,
827770 Keys = IsEmptyObject < DefinedNumberFormat > extends false
@@ -832,24 +775,10 @@ declare module 'vue' {
832775 ResourceKeys extends Keys = IsNever < Keys > extends false ? Keys : never
833776 > (
834777 value : number ,
835- key : Key | ResourceKeys ,
778+ options : NumberOptions < Key , ResourceKeys > ,
836779 locale : Locale
837- ) : string
838- /**
839- * Number formatting
840- *
841- * @remarks
842- * Overloaded `$n`. About details, see the {@link $n} remarks.
843- *
844- * @param value - A number value
845- * @param options - An options, see the {@link NumberOptions}
846- *
847- * @returns formatted value
848- */
849- $n < OptionsType extends NumberOptions > (
850- value : number ,
851- options : OptionsType
852- ) : OptionsType [ 'part' ] extends true ? Intl . NumberFormatPart [ ] : string
780+ ) : Return
781+
853782 /**
854783 * Locale messages getter
855784 *
0 commit comments