Files
agentic-studio/network-poc/frontend/node_modules/micromark-util-resolve-all/index.js
Jaakko Vanhala a8c4af0975 Frontend uudelleenrakennettu: Astro-komponentit, Wasm pääsäikeessä, ei Workeria
Vanha frontend siirretty temp/. Uusi rakenne:
- StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro
- global.css erillinen
- Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava)
- Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md
- Ei tokenisointia eikä koodilaboratoriota

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 20:17:39 +03:00

33 lines
784 B
JavaScript

/**
* @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
*/
/**
* Call all `resolveAll`s.
*
* @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
* List of constructs, optionally with `resolveAll`s.
* @param {Array<Event>} events
* List of events.
* @param {TokenizeContext} context
* Context used by `tokenize`.
* @returns {Array<Event>}
* Changed events.
*/
export function resolveAll(constructs, events, context) {
/** @type {Array<Resolver>} */
const called = []
let index = -1
while (++index < constructs.length) {
const resolve = constructs[index].resolveAll
if (resolve && !called.includes(resolve)) {
events = resolve(events, context)
called.push(resolve)
}
}
return events
}