type ListNode = { key: K; next: undefined | ListNode; value: T; }; type RootNode = { next: undefined | ListNode; }; export function listGetNode( list: RootNode, key: ListNode['key'], isDelete?: boolean ): ListNode | undefined; export function listGet( objects: undefined | RootNode, key: ListNode['key'] ): T | undefined; export function listSet( objects: RootNode, key: ListNode['key'], value: T ): void; export function listHas( objects: undefined | RootNode, key: ListNode['key'] ): boolean; export function listDelete( objects: undefined | RootNode, key: ListNode['key'] ): ListNode | undefined;