Skip to content

Commit

Permalink
refactor(wasm-api-dom): regenerate types
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jan 29, 2023
1 parent eb0c249 commit a28869d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
82 changes: 81 additions & 1 deletion packages/wasm-api-dom/src/generated/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Generated by @thi.ng/wasm-api-bindgen at 2022-11-30T15:23:27.747Z
* Generated by @thi.ng/wasm-api-bindgen at 2023-01-29T19:33:09.081Z
* DO NOT EDIT!
*/

Expand Down Expand Up @@ -96,6 +96,11 @@ export const $WindowInfo: WasmTypeConstructor<WindowInfo> = (mem) => ({
get size() {
return 16;
},
instanceArray(base, num) {
const items: WindowInfo[] = [];
for (; num --> 0; base += 16) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -198,6 +203,11 @@ export const $DragEvent: WasmTypeConstructor<DragEvent> = (mem) => ({
get size() {
return 8;
},
instanceArray(base, num) {
const items: DragEvent[] = [];
for (; num --> 0; base += 8) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -288,6 +298,11 @@ export const $InputEvent: WasmTypeConstructor<InputEvent> = (mem) => ({
get size() {
return 12;
},
instanceArray(base, num) {
const items: InputEvent[] = [];
for (; num --> 0; base += 12) items.push(this.instance(base));
return items;
},
instance: (base) => {
let $value: WasmStringPtr | null = null;
return {
Expand Down Expand Up @@ -366,6 +381,11 @@ export const $KeyEvent: WasmTypeConstructor<KeyEvent> = (mem) => ({
get size() {
return 19;
},
instanceArray(base, num) {
const items: KeyEvent[] = [];
for (; num --> 0; base += 19) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -450,6 +470,11 @@ export const $MouseEvent: WasmTypeConstructor<MouseEvent> = (mem) => ({
get size() {
return 8;
},
instanceArray(base, num) {
const items: MouseEvent[] = [];
for (; num --> 0; base += 8) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -594,6 +619,11 @@ export const $PointerEvent: WasmTypeConstructor<PointerEvent> = (mem) => ({
get size() {
return 24;
},
instanceArray(base, num) {
const items: PointerEvent[] = [];
for (; num --> 0; base += 24) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -718,6 +748,11 @@ export const $ScrollEvent: WasmTypeConstructor<ScrollEvent> = (mem) => ({
get size() {
return 8;
},
instanceArray(base, num) {
const items: ScrollEvent[] = [];
for (; num --> 0; base += 8) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -782,6 +817,11 @@ export const $TouchEvent: WasmTypeConstructor<TouchEvent> = (mem) => ({
get size() {
return 6;
},
instanceArray(base, num) {
const items: TouchEvent[] = [];
for (; num --> 0; base += 6) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -870,6 +910,11 @@ export const $WheelEvent: WasmTypeConstructor<WheelEvent> = (mem) => ({
get size() {
return 10;
},
instanceArray(base, num) {
const items: WheelEvent[] = [];
for (; num --> 0; base += 10) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -945,6 +990,11 @@ export const $EventBody: WasmTypeConstructor<EventBody> = (mem) => ({
get size() {
return 24;
},
instanceArray(base, num) {
const items: EventBody[] = [];
for (; num --> 0; base += 24) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -1042,6 +1092,11 @@ export const $Event: WasmTypeConstructor<Event> = (mem) => ({
get size() {
return 32;
},
instanceArray(base, num) {
const items: Event[] = [];
for (; num --> 0; base += 32) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -1104,6 +1159,11 @@ export const $EventListener: WasmTypeConstructor<EventListener> = (mem) => ({
get size() {
return 8;
},
instanceArray(base, num) {
const items: EventListener[] = [];
for (; num --> 0; base += 8) items.push(this.instance(base));
return items;
},
instance: (base) => {
return {
get __base() {
Expand Down Expand Up @@ -1192,6 +1252,11 @@ export const $CreateElementOpts: WasmTypeConstructor<CreateElementOpts> = (mem)
get size() {
return 48;
},
instanceArray(base, num) {
const items: CreateElementOpts[] = [];
for (; num --> 0; base += 48) items.push(this.instance(base));
return items;
},
instance: (base) => {
let $tag: WasmStringPtr | null = null;
let $ns: WasmStringPtr | null = null;
Expand Down Expand Up @@ -1319,6 +1384,11 @@ export const $CreateCanvasOpts: WasmTypeConstructor<CreateCanvasOpts> = (mem) =>
get size() {
return 32;
},
instanceArray(base, num) {
const items: CreateCanvasOpts[] = [];
for (; num --> 0; base += 32) items.push(this.instance(base));
return items;
},
instance: (base) => {
let $id: WasmStringPtr | null = null;
let $class: WasmStringPtr | null = null;
Expand Down Expand Up @@ -1393,6 +1463,11 @@ export const $Attrib: WasmTypeConstructor<Attrib> = (mem) => ({
get size() {
return 24;
},
instanceArray(base, num) {
const items: Attrib[] = [];
for (; num --> 0; base += 24) items.push(this.instance(base));
return items;
},
instance: (base) => {
let $name: WasmStringPtr | null = null;
return {
Expand Down Expand Up @@ -1441,6 +1516,11 @@ export const $AttribValue: WasmTypeConstructor<AttribValue> = (mem) => ({
get size() {
return 8;
},
instanceArray(base, num) {
const items: AttribValue[] = [];
for (; num --> 0; base += 8) items.push(this.instance(base));
return items;
},
instance: (base) => {
let $str: WasmStringPtr | null = null;
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm-api-dom/zig/api.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Generated by @thi.ng/wasm-api-bindgen at 2022-11-30T15:23:27.752Z
//! Generated by @thi.ng/wasm-api-bindgen at 2023-01-29T19:33:09.085Z
//! DO NOT EDIT!

const std = @import("std");
Expand Down

0 comments on commit a28869d

Please sign in to comment.