char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
44fe2c6
main
1declare module"ext:core/ops" { 2type MessageError = typeof import ( "./events.js" ). dataCloneError ; 3type MessagePacket = { 4data :unknown ; 5ports :import ( "./messaging.js" ). MessagePort []; 6}; 7type TransferCallbacks = ReturnType < typeof import ( "./serialization.js" ). transferCallbacks >; 8 9export function op_navigator_metadata ( unit :null ) :[ string , number , string ]; 10export function op_navigator_user_agent_data ( unit :null ) :{ 11brands :{ brand :string ; version :string }[]; 12mobile :boolean ; 13platform :string ; 14architecture :string ; 15bitness :string ; 16model :string ; 17platformVersion :string ; 18uaFullVersion :string ; 19fullVersionList :{ brand :string ; version :string }[]; 20wow64 :boolean ; 21}; 22 23export function op_broadcast_open ( name :string ) :number ; 24export function op_broadcast_close ( id :number ) :null ; 25export function op_broadcast_send ( 26id :number , 27value :unknown , 28classify :typeof import ( "./serialization.js" ). classify , 29encode :TransferCallbacks [ "encodeHost" ], 30error :MessageError , 31validate :TransferCallbacks [ "validate" ], 32commit :TransferCallbacks [ "commit" ], 33) :undefined ; 34 35export function op_port_pair () :[ number , number ]; 36export function op_port_adopt ( id :number ) :number ; 37export function op_port_move ( id :number ) :null ; 38export function op_port_close ( id :number ) :null ; 39export function op_port_peer ( id :number ) :number | null ; 40export function op_port_wait ( args :[ id :number , epoch :number ]) :Promise < boolean >; 41export function op_port_wait_ref ( args :[ id :number , epoch :number ]) :Promise < boolean >; 42export function op_port_send ( 43id :number | null , 44value :unknown , 45transfer :unknown [], 46classify :typeof import ( "./serialization.js" ). classify , 47encode :TransferCallbacks [ "encodeHost" ], 48error :MessageError , 49validate :TransferCallbacks [ "validate" ], 50commit :TransferCallbacks [ "commit" ], 51) :undefined ; 52export function op_port_take ( 53id :number , 54epoch :number , 55decode :typeof import ( "./serialization.js" ). decodeWire , 56error :MessageError , 57) :MessagePacket | null ; 58}