This commit is contained in:
Tobe O 2018-11-29 14:38:34 -05:00
parent f5d5f3660f
commit 60f36206fb
5 changed files with 40 additions and 33 deletions

View file

@ -1,3 +1,6 @@
# 2.1.2
* Add `declare module` to generated TypeScript files.
# 2.1.1
* Generate `hashCode`.

View file

@ -156,9 +156,9 @@ class TypeScriptDefinitionBuilder implements Builder {
buf.writeln('// GENERATED CODE - DO NOT MODIFY BY HAND');
// declare module `foo` {
//buf
// ..writeln("declare module '${buildStep.inputId.package}' {")
// ..indent();
buf
..writeln("declare module '${buildStep.inputId.package}' {")
..indent();
for (var ctx in contexts) {
// interface Bar { ... }
@ -190,9 +190,9 @@ class TypeScriptDefinitionBuilder implements Builder {
}
}
//buf
// ..outdent()
// ..writeln('}');
buf
..outdent()
..writeln('}');
var finalBuf = new CodeBuffer();
refs.forEach(finalBuf.writeln);
buf.copyInto(finalBuf);

View file

@ -1,5 +1,5 @@
name: angel_serialize_generator
version: 2.1.1
version: 2.1.2
description: Model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/serialize

View file

@ -1,5 +1,6 @@
/// <reference path="./book.d.ts" />
// GENERATED CODE - DO NOT MODIFY BY HAND
declare module 'angel_serialize_generator' {
interface Library {
id?: string;
collection?: LibraryCollection;
@ -17,3 +18,4 @@ interface Bookmark {
created_at?: any;
updated_at?: any;
}
}

View file

@ -1,4 +1,5 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
declare module 'angel_serialize_generator' {
interface Book {
id?: string;
author?: string;
@ -10,3 +11,4 @@ interface Book {
created_at?: any;
updated_at?: any;
}
}