feat(codemode): support custom async iterators (#38141)
This commit is contained in:
parent
dbfbb13ccc
commit
6f4b9504e5
7 changed files with 636 additions and 51 deletions
|
|
@ -36,7 +36,7 @@ export type StatementResult =
|
|||
|
||||
export type MemberReference = {
|
||||
target: SafeObject | Array<unknown> | CodeModeRegExp | CodeModeURL
|
||||
key: string | number
|
||||
key: PropertyKey
|
||||
}
|
||||
|
||||
export class CodeModeFunction {
|
||||
|
|
@ -61,6 +61,12 @@ export class ComputedValue {
|
|||
|
||||
export class PromiseNamespace {}
|
||||
|
||||
export class SymbolNamespace {}
|
||||
|
||||
export const AsyncIteratorSymbol: unique symbol = Symbol("codemode.async-iterator")
|
||||
export const IteratorSymbol: unique symbol = Symbol("codemode.iterator")
|
||||
export const IteratorSymbols = [AsyncIteratorSymbol, IteratorSymbol] as const
|
||||
|
||||
export type PromiseMethodName = "all" | "allSettled" | "race" | "any" | "resolve" | "reject"
|
||||
|
||||
export class PromiseMethodReference {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue