main
ts 13 lines 307 Bytes
Raw
1 // Browsers may not support `using`, so the client build should lower it
2 const disposed: string[] = [];
3 {
4 using _resource = {
5 [Symbol.dispose]() {
6 disposed.push("resource");
7 },
8 };
9 }
10 const heading = document.querySelector("h1");
11 if (heading) {
12 heading.textContent = disposed.join(",");
13 }