Page MenuHomePhabricator

[web] add types for WASM Module
ClosedPublic

Authored by kamil on Jul 19 2023, 2:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 2:33 PM
Unknown Object (File)
Fri, Nov 22, 5:45 PM
Unknown Object (File)
Fri, Nov 1, 3:34 PM
Unknown Object (File)
Tue, Oct 29, 10:36 PM
Unknown Object (File)
Oct 26 2024, 1:59 AM
Unknown Object (File)
Oct 16 2024, 1:31 PM
Unknown Object (File)
Oct 15 2024, 6:21 AM
Unknown Object (File)
Oct 14 2024, 5:16 PM
Subscribers

Details

Summary

Based on

Depends on D8544

Test Plan

flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
web/database/types/module.js
30 ↗(On Diff #28816)

docs

I wasn't able to find information about what type

70 ↗(On Diff #28816)

I decided to put this here, not in flow-typed, because here we will have the SQLiteQueryExecutor type, which uses types from lib, so this is not a regular libdef

kamil published this revision for review.Jul 19 2023, 8:56 AM

comm-query-creator.js filename doesn't match the class inside

web/database/types/module.js
10–19 ↗(On Diff #28816)

Can these be read only?

27 ↗(On Diff #28816)

In the docs it's only an array of functions. Should we stick to the typescript defs (and remove the singular function option)?

30 ↗(On Diff #28816)

Can we type as mixed?

32 ↗(On Diff #28816)

Shouldn't this be a singular function?

This revision is now accepted and ready to land.Jul 20 2023, 7:37 AM

address review

web/database/types/module.js
27 ↗(On Diff #28816)

yeah, I'll use only array of functions (I think docs are more accurate)

30 ↗(On Diff #28816)

sure

32 ↗(On Diff #28816)

yes, you're right

This revision was automatically updated to reflect the committed changes.

Same feedback as here... best to avoid class and interface if possible. Sometimes they are needed for inheritance reasons, but it doesn't look like it here