Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing of typescript Suggestion #36

Closed
kurybr opened this issue Feb 3, 2024 · 2 comments
Closed

Typing of typescript Suggestion #36

kurybr opened this issue Feb 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kurybr
Copy link

kurybr commented Feb 3, 2024

First, congratz of your job.

I use with typescript and want suggest a little help to other people

declare module 'form-data-json-convert' {
	interface OptionsToJson {
	  includeDisabled?: boolean;
	  includeButtonValues?: boolean;
	  uncheckedValue?: any;
	  inputFilter?: ((inputElement: HTMLInputElement) => boolean) | null;
	  flatList?: boolean;
	  skipEmpty?: boolean;
	  filesCallback?: ((values: any) => void) | null;
	  fileReaderFunction?: string;
	  arrayify?: boolean;
	}
  
	interface OptionsFromJson {
	  flatList?: boolean;
	  clearOthers?: boolean;
	  resetOthers?: boolean;
	  triggerChangeEvent?: boolean;
	}
  
	function toJson(
	  form: HTMLFormElement | string | JQuery,
	  options?: OptionsToJson
	): any;
  
	function fromJson(
	  form: HTMLFormElement | string | JQuery,
	  values: any,
	  options?: OptionsFromJson
	): void;
  
	function reset(form: HTMLFormElement | string | JQuery): void;
  
	function clear(form: HTMLFormElement | string | JQuery): void;
  
	const defaultOptionsToJson: OptionsToJson;
	const defaultOptionsFromJson: OptionsFromJson;
  }
@kurybr kurybr added the enhancement New feature or request label Feb 3, 2024
@brainfoolong
Copy link
Owner

Thx for the suggestions. I'll into that.

@brainfoolong
Copy link
Owner

Thx for the suggestion, the file is now added in 2.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants