Result: imported rows after opening a workbook whose first row is Item, Amount
The source file has headers Item, Amount, then rows Tea, 12 and Coffee, 18. The headers become column keys, not data cells. Edit a value, then save the current workbook.
Await initSheetwrite() before creating a Grid. Keep the returned disposer in a single-page application and call it when the view leaves; pagehide covers this standalone example. The disposer aborts conversion, removes controls and destroys the Grid. A file parse failure keeps the current Grid. A successful import replaces it, so prior undo history does not carry over.
Initialization errors appear in the host. Codec errors appear beside the controls. No file is substituted when import fails.
Options and limits
Choice
Behavior
Import
fromXlsxTable reads only the first sheet. Its first row supplies headers. Formula source and workbook formatting are not preserved by table import.
Save
toXlsxWorkbook saves the current Grid as a workbook, not only its visible viewport.
Budget
This example accepts 100,000 cells and at most 8 MiB of input. Codec defaults still bound ZIP entries, expanded bytes, XML depth and other resources.
Cancel
Unmount aborts work between bounded codec stages. Cancellation is not an immediate interrupt inside a stage.
Import builds the full result in memory. The Blob workbook importer avoids an initial full-file buffer, but still returns an in-memory snapshot; it is not an unbounded-data reader. Use workbook interchange instead of table import when you must retain sheets, formulas, styles and kept parts. Surface its onWarning messages when fidelity matters. Resource failures are XlsxResourceError values and also satisfy isSheetwriteError.
function fromXlsxTable(data: ArrayBuffer | Uint8Array, options?: XlsxWorkbookOptions): Promise<ColumnarData>functionfromXlsxTable(data:ArrayBuffer|Uint8Array,options?:XlsxWorkbookOptions,):Promise<ColumnarData>functionfromXlsxTable(data:ArrayBuffer|Uint8Array,options?:XlsxWorkbookOptions,):Promise<ColumnarData>Parse the first sheet of .xlsx bytes into ColumnarData. The first parsed row is treated as the header and its cell text becomes each column's key. Numbers stay numbers, date cells use the date-serial convention, strings are verbatim, and empty cells become null.Exampleimport { registerXlsxBackends } from"@sheetwrite/xlsx";import { fromXlsxTable } from"@sheetwrite/core";registerXlsxBackends();asyncfunctionopenTable(file:File) {returnfromXlsxTable(await file.arrayBuffer());}See alsotoXlsxTableAPI reference →interface XlsxWorkbookOptionsinterfaceXlsxWorkbookOptionsinterfaceXlsxWorkbookOptionsShared options passed to every registered table and workbook XLSX backend.API reference →data: ColumnarDatalet data:ColumnarDatalet data:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →interface ColumnarDatainterfaceColumnarDatainterfaceColumnarDataEager column-oriented values used to initialize a sheet.API reference →interface WorkbookinterfaceWorkbookinterfaceWorkbookLive workbook schema containing ordered sheets and the active sheet ID.API reference →interface FileinterfaceFileinterfaceFileThe File interface provides information about files and allows JavaScript in a web page to access their content. MDN Referenceinterface Promise<T>interfacePromise<T>interfacePromise<T>Represents the completion of an asynchronous operationinterface GridinterfaceGridinterfaceGridImperative grid handle for document commands, events, rendering, and teardown.Exampleimporttype { Grid } from"@sheetwrite/core";functionupdateTotal(grid:Grid) {constsheet= grid.getActiveSheet();constresult= grid.applyTransaction({patches: [{ op: "set", addr: { sheet, row: 0, col: 0 }, value: { kind: "literal", value: 42 } }],});if (result.status ==="applied") grid.scrollToCell({ sheet, row: 0, col: 0 });return grid.aggregate(0, "sum");}See alsocreateGrid *See alsoGrid.applyTransactionAPI reference →const data: ColumnarDataconstdata:ColumnarDataconstdata:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →file: Filelet file:Filelet file:FileBlob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Blob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Blob.arrayBuffer(): Promise<ArrayBuffer> (+1 overload)Returns a promise that resolves to the contents of the blob as an ArrayBufferconst options: () => XlsxWorkbookOptionsconstoptions: () =>XlsxWorkbookOptionsconstoptions: () =>XlsxWorkbookOptionsAPI reference →const grid: Gridconstgrid:Gridconstgrid:GridThe imperative core grid this controller owns.API reference →Grid.destroy(): voidGrid.destroy(): voidGrid.destroy(): voidRuns immediately before a retained element is removed or replaced.API reference →function createGrid(host: HTMLElement, opts: GridOptions): GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridCreates and mounts an imperative Grid in the supplied host element.Exampleimport { createGrid, initSheetwrite } from"@sheetwrite/core";awaitinitSheetwrite();consthost= document.createElement("div");host.style.height ="400px";document.body.append(host);constgrid=createGrid(host, {workbook: {activeSheet: "sales",sheets: [{ id: "sales", name: "Sales", rowCount: 2,columns: [{ key: "amount", header: "Amount", type: "number", width: 120 }] }],},data: { rowCount: 2, columns: { amount: [12, 18] } },});grid.scrollToCell({ sheet: "sales", row: 1, col: 0 });// Call when the host view is removed.grid.destroy();See alsoGrid *See alsoGridOptionsAPI reference →const host: HTMLElementconsthost:HTMLElementconsthost:HTMLElementGridOptions.workbook: WorkbookinterfaceGridOptions {workbook:Workbook;}interfaceGridOptions {workbook:Workbook;}Live workbook schema adopted by the store and updated by document operations.API reference →function workbookFor(data: ColumnarData): WorkbookfunctionworkbookFor(data:ColumnarData):WorkbookfunctionworkbookFor(data:ColumnarData,):WorkbookGridOptions.data?: ColumnarData | undefinedinterfaceGridOptions {data?:ColumnarData|undefined;}interfaceGridOptions {data?:ColumnarData|undefined;}Eager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →function initSheetwrite(source?: BufferSource | URL | string | Request | WebAssembly.Module, engine?: SheetwriteEngine): Promise<void>functioninitSheetwrite(source?:BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>functioninitSheetwrite(source?:|BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>Load one WASM engine before createGrid. The default is @sheetwrite/wasm. Pass the @sheetwrite/formulas module as the second argument to select the full engine.Exampleimport { initSheetwrite } from"@sheetwrite/core";import*as formulas from"@sheetwrite/formulas";awaitinitSheetwrite(undefined, formulas);See also/docs/start/choose-an-engine/See alsocreateGridAPI reference →function toXlsxWorkbook(input: WorkbookSnapshot | Pick<Grid, "exportSnapshot">, options?: XlsxWorkbookOptions): Promise<Uint8Array>functiontoXlsxWorkbook(input:WorkbookSnapshot|Pick<Grid, "exportSnapshot">,options?:XlsxWorkbookOptions,):Promise<Uint8Array>functiontoXlsxWorkbook(input:|WorkbookSnapshot|Pick<Grid,"exportSnapshot">,options?:XlsxWorkbookOptions,):Promise<Uint8Array>Formula-preserving, multi-sheet workbook export through the optional XLSX backend.Exampleimport { registerXlsxBackends } from"@sheetwrite/xlsx";import { toXlsxWorkbook, downloadBytes, type Grid } from"@sheetwrite/core";registerXlsxBackends();asyncfunctiondownload(grid:Grid) {constbytes=awaittoXlsxWorkbook(grid);downloadBytes(bytes, "workbook.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");}See alsofromXlsxWorkbookAPI reference →function downloadBytes(bytes: Uint8Array | string, filename: string, mime: string): voidfunctiondownloadBytes(bytes:Uint8Array|string,filename:string,mime:string,):voidfunctiondownloadBytes(bytes:Uint8Array|string,filename:string,mime:string,):voidTrigger a browser download from in-memory bytes. The temporary anchor is removed and its object URL is scheduled for revocation even when DOM append or click throws.API reference →function isSheetwriteError(value: unknown): value is SheetwriteErrorEnvelopefunctionisSheetwriteError(value:unknown,):valueisSheetwriteErrorEnvelopefunctionisSheetwriteError(value:unknown,):valueisSheetwriteErrorEnvelopeNarrow same-realm errors, cross-realm errors, and serialized failure envelopes.API reference →ColumnarData.rowCount: numberinterfaceColumnarData {rowCount:number;}interfaceColumnarData {rowCount:number;}Row count for both in-memory and datasource-backed sheets.API reference →ColumnarData.columns: Record<string, ArrayLike<CellScalar | CellValue>>interfaceColumnarData {columns:Record<string, ArrayLike<CellScalar|CellValue>>;}interfaceColumnarData {columns:Record<string,ArrayLike<CellScalar|CellValue>>;}Exact column runs represented by every returned row.API reference →type Item: string[]typeItem: string[]typeItem: string[]type Amount: number[]typeAmount: number[]typeAmount: number[]Workbook.activeSheet: stringinterfaceWorkbook {activeSheet:string;}interfaceWorkbook {activeSheet:string;}Active sheet ID and initial tab presented when the grid is created.API reference →Workbook.sheets: Sheet[]interfaceWorkbook {sheets:Sheet[];}interfaceWorkbook {sheets:Sheet[];}Sheets in display/tab order.API reference →Sheet.id: stringinterfaceSheet {id:string;}interfaceSheet {id:string;}Stable identifier, unique within the workbook and used by every cell address.API reference →Sheet.name: stringinterfaceSheet {name:string;}interfaceSheet {name:string;}User-facing sheet name shown in tabs and workbook exports.API reference →Sheet.rowCount: numberinterfaceSheet {rowCount:number;}interfaceSheet {rowCount:number;}Row count for both in-memory and datasource-backed sheets.API reference →Sheet.columns: Column[]interfaceSheet {columns:Column[];}interfaceSheet {columns:Column[];}Ordered schema; array positions are the zero-based column coordinates.API reference →var Object: ObjectConstructorvar Object:ObjectConstructorvar Object:ObjectConstructorProvides functionality common to all JavaScript objects.ObjectConstructor.keys(o: {}): string[] (+1 overload)ObjectConstructor.keys(o: {}): string[] (+1 overload)ObjectConstructor.keys(o: {}): string[] (+1 overload)Returns the names of the enumerable string properties and methods of an object.@param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.API reference →Array<string>.map<{
key: string;
header: string;
width: number;
type: "number" | "text";
}>(callbackfn: (value: string, index: number, array: string[]) => {
key: string;
header: string;
width: number;
type: "number" | "text";
}, thisArg?: any): {
key: string;
header: string;
width: number;
type: "number" | "text";
}[]Array<string>.map<{key:string;header:string;width:number;type:"number"|"text";}>(callbackfn: (value:string, index:number, array:string[]) => {key:string;header:string;width:number;type:"number"|"text";}, thisArg?:any): {key:string;header:string;width:number;type:"number"|"text";}[]Array<string>.map<{key:string;header:string;width:number;type:"number"|"text";}>(callbackfn: (value:string, index:number, array:string[]) => {key:string;header:string;width:number;type:"number"|"text";}, thisArg?:any): {key:string;header:string;width:number;type:"number"|"text";}[]Calls a defined callback function on each element of an array, and returns an array that contains the results.@param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.@param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.key: stringlet key:stringlet key:stringNon-empty key, unique within the sheet, used to map input and datasource values.API reference →header: stringlet header:stringlet header:stringSchema label used by table exports and data-grid presentation headers.API reference →width: numberlet width:numberlet width:numberUnzoomed column width in CSS pixels.API reference →type: "number" | "text"let type:"number"|"text"let type:"number"|"text"Controls cell input parsing and default value formatting for this column.API reference →const message: (error: unknown) => stringconstmessage: (error:unknown) =>stringconstmessage: (error:unknown,) =>stringerror: SheetwriteErrorEnvelopelet error:SheetwriteErrorEnvelopelet error:SheetwriteErrorEnvelopeAPI reference →SheetwriteErrorEnvelope.code: "initialization-failed" | "initialization-required" | "datasource-request-failed" | "renderer-fallback" | "export-failed" | "xlsx-import-failed" | "optional-backend-unavailable" | "delimited-text-resource-limit" | "delimited-text-invalid-limit" | "xlsx-resource-limit" | "resource-limit" | "invalid-snapshot" | "aborted" | "not-found" | "commit-rejected" | "unavailable" | "blocked" | "quota" | "unsupported-schema" | "transaction" | "conflict" | "limit" | "invalid-limits" | "invalid-version" | "invalid-id" | "invalid-operations" | ... 24 more ... | "shortcut-conflict"interfaceSheetwriteErrorEnvelope { code:"initialization-failed"|"initialization-required"|"datasource-request-failed"|"renderer-fallback"|"export-failed"|"xlsx-import-failed"|"optional-backend-unavailable"|"delimited-text-resource-limit"|"delimited-text-invalid-limit"|"xlsx-resource-limit"|"resource-limit"|"invalid-snapshot"|"aborted"|"not-found"|"commit-rejected"|"unavailable"|"blocked"|"quota"|"unsupported-schema"|"transaction"|"conflict"|"limit"|"invalid-limits"|"invalid-version"|"invalid-id"|"invalid-operations"| ... 24more ... |"shortcut-conflict" }interfaceSheetwriteErrorEnvelope { code:"initialization-failed"|"initialization-required"|"datasource-request-failed"|"renderer-fallback"|"export-failed"|"xlsx-import-failed"|"optional-backend-unavailable"|"delimited-text-resource-limit"|"delimited-text-invalid-limit"|"xlsx-resource-limit"|"resource-limit"|"invalid-snapshot"|"aborted"|"not-found"|"commit-rejected"|"unavailable"|"blocked"|"quota"|"unsupported-schema"|"transaction"|"conflict"|"limit"|"invalid-limits"|"invalid-version"|"invalid-id"|"invalid-operations"| ... 24more ... |"shortcut-conflict" }API reference →SheetwriteErrorEnvelope.message: stringinterfaceSheetwriteErrorEnvelope {message:string;}interfaceSheetwriteErrorEnvelope {message:string;}API reference →var String: StringConstructor
(value?: any) => stringvar String:StringConstructor;(value?:any) => stringvar String:StringConstructor;(value?:any) => stringAllows manipulation and formatting of text strings and determination and location of substrings within strings.error: unknownlet error:unknownlet error:unknownconst mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"constmime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"constmime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"function mountExcel(host: HTMLElement): Promise<() => void>functionmountExcel(host:HTMLElement):Promise<() =>void>functionmountExcel(host:HTMLElement,):Promise<() =>void>interface HTMLElementinterfaceHTMLElementinterfaceHTMLElementThe HTMLElement interface represents any HTML element. MDN Referenceconst controller: AbortControllerconstcontroller:AbortControllerconstcontroller:AbortControllervar AbortController: new () => AbortControllervar AbortController:new () =>AbortControllervar AbortController:new () =>AbortControllerThe AbortController interface represents a controller object that allows you to abort one or more Web requests as and when desired. MDN Reference An AbortController cancels one or more Web requests: pass its signal to a request, then call abort(). MDN Referenceconst controls: HTMLDivElementconstcontrols:HTMLDivElementconstcontrols:HTMLDivElementvar document: Documentvar document:Documentvar document:Documentwindow.document returns a reference to the document contained in the window. MDN ReferenceAPI reference →Document.createElement<"div">(tagName: "div", options?: ElementCreationOptions): HTMLDivElement (+2 overloads)Document.createElement<"div">(tagName: "div", options?: ElementCreationOptions): HTMLDivElement (+2 overloads)Document.createElement<"div">(tagName: "div", options?: ElementCreationOptions): HTMLDivElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN Referenceconst picker: HTMLInputElementconstpicker:HTMLInputElementconstpicker:HTMLInputElementDocument.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceHTMLInputElement.type: stringinterfaceHTMLInputElement {type:string;}interfaceHTMLInputElement {type:string;}The type property of the HTMLInputElement interface indicates the kind of data allowed in the input element, for example a number, a date, or an email. MDN ReferenceAPI reference →HTMLInputElement.accept: stringinterfaceHTMLInputElement {accept:string;}interfaceHTMLInputElement {accept:string;}The accept property of the HTMLInputElement interface reflects the input element's accept attribute, generally a comma-separated list of unique file type specifiers providing a hint for the expected file type for an <input> of type file. MDN Referenceconst save: HTMLButtonElementconstsave:HTMLButtonElementconstsave:HTMLButtonElementDocument.createElement<"button">(tagName: "button", options?: ElementCreationOptions): HTMLButtonElement (+2 overloads)Document.createElement<"button">(tagName: "button", options?: ElementCreationOptions): HTMLButtonElement (+2 overloads)Document.createElement<"button">(tagName: "button", options?: ElementCreationOptions): HTMLButtonElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.textContent: string | nullinterfaceElement {textContent:string|null;}interfaceElement {textContent:string|null;}MDN Referenceconst status: HTMLParagraphElementconststatus:HTMLParagraphElementconststatus:HTMLParagraphElementDocument.createElement<"p">(tagName: "p", options?: ElementCreationOptions): HTMLParagraphElement (+2 overloads)Document.createElement<"p">(tagName: "p", options?: ElementCreationOptions): HTMLParagraphElement (+2 overloads)Document.createElement<"p">(tagName: "p", options?: ElementCreationOptions): HTMLParagraphElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidThe setAttribute() method of the Element interface sets the value of an attribute on the specified element. MDN ReferenceParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidInserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN Referencehost: HTMLElementlet host:HTMLElementlet host:HTMLElementChildNode.before(...nodes: (Node | string)[]): voidChildNode.before(...nodes: (Node | string)[]): voidChildNode.before(...nodes: (Node | string)[]): voidInserts nodes just before node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN ReferenceElementCSSInlineStyle.style: CSSStyleDeclarationinterfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}interfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}MDN ReferenceAPI reference →CSSStyleDeclaration.height: stringinterfaceCSSStyleDeclaration {height:string;}interfaceCSSStyleDeclaration {height:string;}MDN ReferenceAPI reference →let grid: Gridlet grid:Gridlet grid:GridThe imperative core grid this controller owns.API reference →const initialData: ColumnarDataconstinitialData:ColumnarDataconstinitialData:ColumnarDataAPI reference →XlsxWorkbookOptions.signal?: AbortSignal | undefinedinterfaceXlsxWorkbookOptions {signal?:AbortSignal|undefined;}interfaceXlsxWorkbookOptions {signal?:AbortSignal|undefined;}Abort before or between bounded codec operations.API reference →AbortController.signal: AbortSignalinterfaceAbortController {signal:AbortSignal;}interfaceAbortController {signal:AbortSignal;}The signal read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired. MDN ReferenceAPI reference →XlsxWorkbookOptions.maxCells?: number | undefinedinterfaceXlsxWorkbookOptions {maxCells?:number|undefined;}interfaceXlsxWorkbookOptions {maxCells?:number|undefined;}Cells accounted by the active conversion path; defaults to 1,000,000.API reference →XlsxWorkbookOptions.resourceLimits?: Partial<Omit<XlsxResourceLimits, "maxCells">> | undefinedinterfaceXlsxWorkbookOptions {resourceLimits?:Partial<Omit<XlsxResourceLimits, "maxCells">> |undefined;}interfaceXlsxWorkbookOptions {resourceLimits?:|Partial<Omit<XlsxResourceLimits,"maxCells">>|undefined;}Positive overrides for every XLSX resource dimension except maxCells.API reference →maxInputBytes?: number | undefinedmaxInputBytes?: number |undefinedmaxInputBytes?: number |undefinedCompressed workbook input bytes; defaults to 32 MiB.API reference →XlsxWorkbookOptions.onWarning?: ((warning: XlsxWorkbookWarning) => void) | undefinedinterfaceXlsxWorkbookOptions {onWarning?: ((warning:XlsxWorkbookWarning) =>void) |undefined;}interfaceXlsxWorkbookOptions {onWarning?:| ((warning:XlsxWorkbookWarning,) =>void)|undefined;}warning: XlsxWorkbookWarninglet warning:XlsxWorkbookWarninglet warning:XlsxWorkbookWarningAPI reference →XlsxWorkbookWarning.message: stringinterfaceXlsxWorkbookWarning {message:string;}interfaceXlsxWorkbookWarning {message:string;}API reference →(local function) run(action: () => Promise<void>): Promise<void>(local function) run(action: () =>Promise<void>):Promise<void>(local function) run(action: () =>Promise<void>):Promise<void>action: () => Promise<void>letaction: () =>Promise<void>letaction: () =>Promise<void>Built-in action to bind (or "separator"). Omit when supplying onClick.API reference →HTMLInputElement.disabled: booleaninterfaceHTMLInputElement {disabled:boolean;}interfaceHTMLInputElement {disabled:boolean;}The HTMLInputElement.disabled property is a boolean value that reflects the disabled HTML attribute, which indicates whether the control is disabled. MDN ReferenceAPI reference →HTMLButtonElement.disabled: booleaninterfaceHTMLButtonElement {disabled:boolean;}interfaceHTMLButtonElement {disabled:boolean;}The HTMLButtonElement.disabled property indicates whether the control is disabled, meaning that it does not accept any clicks. MDN ReferenceAPI reference →(local var) error: unknown(local var) error: unknown(local var) error: unknownAbortSignal.aborted: booleaninterfaceAbortSignal {aborted:boolean;}interfaceAbortSignal {aborted:boolean;}The aborted read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false). MDN ReferenceGlobalEventHandlers.onchange: ((this: GlobalEventHandlers, ev: Event) => any) | nullinterfaceGlobalEventHandlers {onchange: ((this:GlobalEventHandlers, ev:Event) =>any) |null;}interfaceGlobalEventHandlers {onchange:| ((this:GlobalEventHandlers,ev:Event,) =>any)|null;}MDN Referenceconst file: File | undefinedconstfile:File|undefinedconstfile:File|undefinedHTMLInputElement.files: FileList | nullinterfaceHTMLInputElement {files:FileList|null;}interfaceHTMLInputElement {files:FileList|null;}The HTMLInputElement.files property allows you to access the FileList selected with the <input type='file'> element. MDN ReferenceHTMLInputElement.value: stringinterfaceHTMLInputElement {value:string;}interfaceHTMLInputElement {value:string;}The value property of the HTMLInputElement interface represents the current value of the input element as a string. MDN Referenceconst file: Fileconstfile:Fileconstfile:FileBlob.size: numberinterfaceBlob {size:number;}interfaceBlob {size:number;}The size read-only property of the Blob interface returns the size of the Blob or File in bytes. MDN Reference The size of this Blob in bytesvar Error: ErrorConstructor
new (message?: string, options?: ErrorOptions) => Error (+2 overloads)var Error:ErrorConstructornew (message?:string, options?:ErrorOptions) =>Error (+2 overloads)var Error:ErrorConstructornew (message?:string, options?:ErrorOptions) =>Error (+2 overloads)GlobalEventHandlers.onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | nullinterfaceGlobalEventHandlers {onclick:((this:GlobalEventHandlers, ev:PointerEvent) =>any) |null;}interfaceGlobalEventHandlers {onclick:| ((this:GlobalEventHandlers,ev:PointerEvent,) =>any)|null;}MDN Referenceconst bytes: Uint8Array<ArrayBufferLike>constbytes:Uint8Array<ArrayBufferLike>constbytes:Uint8Array<ArrayBufferLike>AbortController.abort(reason?: any): void (+1 overload)AbortController.abort(reason?: any): void (+1 overload)AbortController.abort(reason?: any): void (+1 overload)The abort() method of the AbortController interface aborts an asynchronous operation before it has completed. MDN ReferenceChildNode.remove(): voidChildNode.remove(): voidChildNode.remove(): voidRemoves node. MDN Referenceconst host: HTMLDivElementconsthost:HTMLDivElementconsthost:HTMLDivElementDocument.body: HTMLElementinterfaceDocument {body:HTMLElement;}interfaceDocument {body:HTMLElement;}The Document.body property represents the null if no such element exists. MDN Referenceconst dispose: () => voidconstdispose: () =>voidconstdispose: () =>voidStop observing the store and release cached views.API reference →var window: Window & typeof globalThisvar window:Window&typeof globalThisvar window:Window&typeof globalThisThe window property of a Window object points to the window object itself. MDN ReferenceaddEventListener<"pagehide">(type: "pagehide", listener: (this: Window, ev: PageTransitionEvent) => any, options?: boolean | AddEventListenerOptions): void (+3 overloads)addEventListener<"pagehide">(type: "pagehide", listener: (this:Window, ev:PageTransitionEvent) => any, options?: boolean | AddEventListenerOptions): void (+3 overloads)addEventListener<"pagehide">(type: "pagehide", listener: (this:Window, ev:PageTransitionEvent) => any, options?: boolean | AddEventListenerOptions): void (+3 overloads)The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. MDN ReferenceAddEventListenerOptions.once?: boolean | undefinedinterfaceAddEventListenerOptions {once?:boolean|undefined;}interfaceAddEventListenerOptions {once?:boolean|undefined;}var error: unknownvar error:unknownvar error:unknown