mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00

This commit makes the compiler pass use different classes in order to represent the metadata. This enables adding per-class toString/convert functions. This enables easy type checking and conversion in the `:set` excmd.
19 lines
275 B
TypeScript
19 lines
275 B
TypeScript
import { Type } from "./Type"
|
|
|
|
export class AnyType implements Type {
|
|
kind = "any"
|
|
|
|
constructor() {}
|
|
|
|
toConstructor() {
|
|
return "new AnyType()"
|
|
}
|
|
|
|
toString() {
|
|
return this.kind
|
|
}
|
|
|
|
convert(argument) {
|
|
return argument
|
|
}
|
|
}
|