/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/testdata/workers/worker_structured_cloning.ts
15 строк
437 B
Matt Mastracci
chore: move cli/tests/ -> tests/ (#22369)
10 фев 2024, 23:22
Не верифицирован
10 фев 2024, 23:22
f5e46c9
Код
Авторство
О чём код?
// More info on structured cloning can be found here: // https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm self.onmessage = () => { const arr = ["a", true, 432]; const set = new Set([1, 3, 5, 7, 9]); const selfReference = { a: arr, b: arr, c: set, }; // deno-lint-ignore no-explicit-any (selfReference as any).self = selfReference; self.postMessage(selfReference); };