syndicate-js/packages/syndicatec/examples/javascript/src/client.js

12 lines
351 B
JavaScript
Raw Normal View History

2021-12-01 16:24:29 +00:00
/// SPDX-License-Identifier: GPL-3.0-or-later
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
2021-01-18 22:11:53 +00:00
2021-01-19 14:13:42 +00:00
import { BoxState, SetBox } from './protocol.js';
2021-01-18 22:11:53 +00:00
boot {
spawn named 'client' {
on asserted BoxState($v) => send message SetBox(v + 1);
on retracted BoxState(_) => console.log('box gone');
}
}