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)
Sun, Dec 15, 8:27 AM
Unknown Object (File)
Sat, Dec 14, 5:08 AM
Unknown Object (File)
Sat, Dec 14, 5:08 AM
Unknown Object (File)
Sat, Dec 14, 5:08 AM
Unknown Object (File)
Sat, Dec 14, 5:08 AM
Unknown Object (File)
Sat, Dec 14, 5:01 AM
Unknown Object (File)
Sun, Dec 8, 2:02 AM
Unknown Object (File)
Tue, Nov 26, 9:08 AM
Subscribers

Details

Summary

Based on

Depends on D8544

Test Plan

flow

Diff Detail

Repository
rCOMM Comm
Branch
land-1
Lint
No Lint Coverage
Unit
No Test Coverage

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