Skip to content

Commit

Permalink
Revert "Single types file"
Browse files Browse the repository at this point in the history
This reverts commit 46c3dcb.
  • Loading branch information
jackocnr committed Jul 10, 2024
1 parent 709d746 commit 772f1e9
Show file tree
Hide file tree
Showing 7 changed files with 1,055 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function(grunt) {
// just images
grunt.registerTask('img', ['responsive_images:retina', 'exec:evenizer', 'responsive_images:regular', 'sprite', 'imagemin', 'generate-scss-metadata']);
// just javascript
grunt.registerTask('js', ['shell:eslint', 'shell:genTsDeclaration', 'shell:buildJs', 'replace', 'shell:buildReact', 'replace:removeImport']);
grunt.registerTask('js', ['shell:eslint', 'shell:genTsDeclaration', 'shell:genReactTsDeclaration', 'shell:buildJs', 'replace', 'shell:buildReact', 'replace:removeImport']);
// just react
grunt.registerTask('react', ['replace:reactWithUtils', 'shell:buildReact', 'replace:removeImport']);

Expand Down
44 changes: 0 additions & 44 deletions build/js/intlTelInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -973,28 +973,6 @@ declare module "intl-tel-input" {
const intlTelInput: IntlTelInputInterface;
export default intlTelInput;
}
declare module "intl-tel-input/react" {
import intlTelInput from "intl-tel-input";
import { Iti, SomeOptions } from "intl-tel-input";
import React from "react";
export { intlTelInput };
type ItiProps = {
initialValue?: string;
onChangeNumber?: (number: string) => void;
onChangeCountry?: (country: string) => void;
onChangeValidity?: (valid: boolean) => void;
onChangeErrorCode?: (errorCode: number | null) => void;
usePreciseValidation?: boolean;
initOptions?: SomeOptions;
inputProps?: object;
};
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
};
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
export default IntlTelInput;
}
declare module "intl-tel-input/utils-compiled" {
export default utils;
const utils: any;
Expand All @@ -1003,25 +981,3 @@ declare module "intl-tel-input/intlTelInputWithUtils" {
import intlTelInput from "intl-tel-input";
export default intlTelInput;
}
declare module "intl-tel-input/reactWithUtils" {
import intlTelInput from "intl-tel-input/intlTelInputWithUtils";
import { Iti, SomeOptions } from "intl-tel-input";
import React from "react";
export { intlTelInput };
type ItiProps = {
initialValue?: string;
onChangeNumber?: (number: string) => void;
onChangeCountry?: (country: string) => void;
onChangeValidity?: (valid: boolean) => void;
onChangeErrorCode?: (errorCode: number | null) => void;
usePreciseValidation?: boolean;
initOptions?: SomeOptions;
inputProps?: object;
};
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
};
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
export default IntlTelInput;
}
3 changes: 3 additions & 0 deletions grunt/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module.exports = function(grunt) {
genTsDeclaration: {
command: 'tsc --p tsconfig.json'
},
genReactTsDeclaration: {
command: 'tsc --p react/tsconfig.json'
},
eslint: {
command: 'eslint src/js/intl-tel-input.ts'
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
"./data": "./build/js/data.js",
"./utils": "./build/js/utils.js",
"./react": {
"types": "./build/js/intlTelInput.d.ts",
"types": "./react/build/IntlTelInput.d.ts",
"require": "./react/build/IntlTelInput.cjs",
"default": "./react/build/IntlTelInput.js"
},
"./reactWithUtils": {
"types": "./build/js/intlTelInput.d.ts",
"types": "./react/build/IntlTelInput.d.ts",
"require": "./react/build/IntlTelInputWithUtils.cjs",
"default": "./react/build/IntlTelInputWithUtils.js"
},
Expand All @@ -133,7 +133,7 @@
"build/js/intlTelInput.d.ts"
],
"react": [
"./build/js/intlTelInput.d.ts"
"react/build/IntlTelInput.d.ts"
]
}
},
Expand Down
Loading

0 comments on commit 772f1e9

Please sign in to comment.