kill() method for trashing smith

This commit is contained in:
Daniel Lugo 2021-09-16 17:08:59 -04:00
parent b77ed72611
commit 3f8faa4daa

View file

@ -712,7 +712,7 @@ function createUserReplica() {
}
/**
* @typedef {Smith.GunSmithNode & { reforge(): void }} RootNode
* @typedef {Smith.GunSmithNode & { kill(): void }} RootNode
*/
/**
@ -727,8 +727,10 @@ const Gun = opts => {
// signature
return {
...createReplica('$root'),
reforge() {
forge()
kill() {
currentGun.send('bye')
currentGun.disconnect()
currentGun.kill()
}
}
}