Skip to main content
Module

x/evt/test/test98.ts

💧EventEmitter's typesafe replacement
Go to Latest
File
import { Evt } from "../lib/index.ts";import { assert } from "https://deno.land/x/tsafe@v1.4.1/assert.ts";;
let stdout = "";
const evt = Evt.create("foo");

evt.evtAttach.attach(() => { stdout += "never"; });
evt.attachOnce(text => { stdout += text });
assert( stdout === "foo" );
console.log("PASS");