Move HTMLInputTypes type to global declarations

This commit is contained in:
David Wheatley 2021-08-20 23:59:54 +02:00
parent b336fd6374
commit c900cb3f6d
No known key found for this signature in database
GPG Key ID: DCC0FCE349280DFF
2 changed files with 28 additions and 24 deletions

View File

@ -1,3 +1,31 @@
/**
* A type that matches any valid value for the `type` attribute on an
* HTML `<input>` element.
*/
declare type HTMLInputTypes =
| 'button'
| 'checkbox'
| 'color'
| 'date'
| 'datetime-local'
| 'email'
| 'file'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'password'
| 'radio'
| 'range'
| 'reset'
| 'search'
| 'submit'
| 'tel'
| 'text'
| 'time'
| 'url'
| 'week';
/**
* @deprecated Please import `app` from a namespace instead of using it as a global variable.
*

View File

@ -20,30 +20,6 @@ interface AdminHeaderOptions {
className: string;
}
type HTMLInputTypes =
| 'button'
| 'checkbox'
| 'color'
| 'date'
| 'datetime-local'
| 'email'
| 'file'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'password'
| 'radio'
| 'range'
| 'reset'
| 'search'
| 'submit'
| 'tel'
| 'text'
| 'time'
| 'url'
| 'week';
interface CommonSettingsItemOptions extends Mithril.Attributes {
setting: string;
label: string | ReturnType<typeof app.translator.trans>;