mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
22 lines
327 B
Plaintext
22 lines
327 B
Plaintext
// wit/calculator.wit
|
|
package vscode:example;
|
|
|
|
interface types {
|
|
record operands {
|
|
left: u32,
|
|
right: u32
|
|
}
|
|
|
|
variant operation {
|
|
add(operands),
|
|
sub(operands),
|
|
mul(operands),
|
|
div(operands)
|
|
}
|
|
}
|
|
world calculator {
|
|
use types.{ operation };
|
|
import log: func(msg: string);
|
|
|
|
export calc: func(o: operation) -> u32;
|
|
} |