breaking(types): type arrays as read-only (#1335)

Closes #1259

* breaking(types): type arrays as read-only

* Run "yarn build:docs"

* test: assert read-only arrays
This commit is contained in:
metonym 2022-06-05 13:25:43 -07:00 committed by GitHub
commit 260bf4e040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 257 additions and 192 deletions

View file

@ -19,13 +19,13 @@ export interface FileUploaderProps
* Specify the accepted file types
* @default []
*/
accept?: string[];
accept?: ReadonlyArray<string>;
/**
* Obtain a reference to the uploaded files
* @default []
*/
files?: File[];
files?: ReadonlyArray<File>;
/**
* Set to `true` to allow multiple files
@ -73,9 +73,9 @@ export interface FileUploaderProps
export default class FileUploader extends SvelteComponentTyped<
FileUploaderProps,
{
add: CustomEvent<File[]>;
remove: CustomEvent<File[]>;
change: CustomEvent<File[]>;
add: CustomEvent<ReadonlyArray<File>>;
remove: CustomEvent<ReadonlyArray<File>>;
change: CustomEvent<ReadonlyArray<File>>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];