Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/side-channel/index.d.ts

    r0c6b92a r79a0317  
     1import getSideChannelList from 'side-channel-list';
     2import getSideChannelMap from 'side-channel-map';
     3import getSideChannelWeakMap from 'side-channel-weakmap';
     4
    15declare namespace getSideChannel {
    2         type Key = unknown;
    3         type ListNode<T> = {
    4                 key: Key;
    5                 next: ListNode<T>;
    6                 value: T;
    7         };
    8         type RootNode<T> = {
    9                 key: object;
    10                 next: null | ListNode<T>;
    11         };
    12         function listGetNode<T>(list: RootNode<T>, key: ListNode<T>['key']): ListNode<T> | void;
    13         function listGet<T>(objects: RootNode<T>, key: ListNode<T>['key']): T | void;
    14         function listSet<T>(objects: RootNode<T>, key: ListNode<T>['key'], value: T): void;
    15         function listHas<T>(objects: RootNode<T>, key: ListNode<T>['key']): boolean;
    16 
    17         type Channel = {
    18                 assert: (key: Key) => void;
    19                 has: (key: Key) => boolean;
    20                 get: <T>(key: Key) => T;
    21                 set: <T>(key: Key, value: T) => void;
    22         }
     6        type Channel<K, V> =
     7                | getSideChannelList.Channel<K, V>
     8                | ReturnType<Exclude<typeof getSideChannelMap<K, V>, false>>
     9                | ReturnType<Exclude<typeof getSideChannelWeakMap<K, V>, false>>;
    2310}
    2411
    25 declare function getSideChannel(): getSideChannel.Channel;
     12declare function getSideChannel<K, V>(): getSideChannel.Channel<K, V>;
    2613
    2714export = getSideChannel;
Note: See TracChangeset for help on using the changeset viewer.