nirum icon indicating copy to clipboard operation
nirum copied to clipboard

TypeScript target

Open disjukr opened this issue 8 years ago • 2 comments

  • [ ] unboxed type
  • [ ] builtin types
    • [ ] runtime
      • [ ] Map
      • [ ] Set
      • [ ] List
  • [ ] type alias
  • [ ] enum type
  • [ ] record type
  • [ ] union type
  • [ ] service client
  • [ ] type definition
    • [ ] flow
    • [ ] typescript

disjukr avatar Aug 16 '16 11:08 disjukr

Type definitions can be separately generated through custom libdef (for Flow) or .d.ts (for Typescript).

dahlia avatar Dec 01 '16 12:12 dahlia

wip

class Offset { // float64
    constructor(value) {
        this.value = value;
    }
    toJSON() {
        return this.value.toJSON ? this.value.toJSON() : this.value;
    }
    static fromJSON(jsonObject) {
        return new Offset(jsonObject);
    }
    eq(other) {
        return other instanceof Offset &&
            this.value === other.value;
    }
}

class Payload {
    constructor({left}) {
        this.left = left;
    }
    toJSON() {
        return {
            _type: 'payload',
            left: this.left.toJSON()
        };
    }
    static fromJSON() {
        //
    }
}



// tood
class Map {
    constructor() {
        this.
    }
    get(key) {
        //
    }
    set(key, value) {
        //
    }
    has() {
        //
    }
}

disjukr avatar Dec 16 '16 11:12 disjukr