mirror of
https://github.com/anomalyco/opencode.git
synced 2026-12-01 22:13:19 +08:00
15 lines
338 B
TypeScript
15 lines
338 B
TypeScript
// expect: erasableSyntaxOnly
|
|
// Script plugins support only erasable TypeScript syntax; `enum` must be refused.
|
|
import { define } from "opencode:plugin"
|
|
|
|
enum Mode {
|
|
On,
|
|
Off,
|
|
}
|
|
|
|
export default define((setup) => {
|
|
setup.command({ name: "enum.bad" }, (host) => {
|
|
host.toast({ variant: "info", message: String(Mode.On) })
|
|
})
|
|
})
|