2.1.2
This commit is contained in:
parent
f5d5f3660f
commit
60f36206fb
5 changed files with 40 additions and 33 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
# 2.1.2
|
||||||
|
* Add `declare module` to generated TypeScript files.
|
||||||
|
|
||||||
# 2.1.1
|
# 2.1.1
|
||||||
* Generate `hashCode`.
|
* Generate `hashCode`.
|
||||||
|
|
||||||
|
|
|
@ -156,9 +156,9 @@ class TypeScriptDefinitionBuilder implements Builder {
|
||||||
buf.writeln('// GENERATED CODE - DO NOT MODIFY BY HAND');
|
buf.writeln('// GENERATED CODE - DO NOT MODIFY BY HAND');
|
||||||
|
|
||||||
// declare module `foo` {
|
// declare module `foo` {
|
||||||
//buf
|
buf
|
||||||
// ..writeln("declare module '${buildStep.inputId.package}' {")
|
..writeln("declare module '${buildStep.inputId.package}' {")
|
||||||
// ..indent();
|
..indent();
|
||||||
|
|
||||||
for (var ctx in contexts) {
|
for (var ctx in contexts) {
|
||||||
// interface Bar { ... }
|
// interface Bar { ... }
|
||||||
|
@ -190,9 +190,9 @@ class TypeScriptDefinitionBuilder implements Builder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//buf
|
buf
|
||||||
// ..outdent()
|
..outdent()
|
||||||
// ..writeln('}');
|
..writeln('}');
|
||||||
var finalBuf = new CodeBuffer();
|
var finalBuf = new CodeBuffer();
|
||||||
refs.forEach(finalBuf.writeln);
|
refs.forEach(finalBuf.writeln);
|
||||||
buf.copyInto(finalBuf);
|
buf.copyInto(finalBuf);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_serialize_generator
|
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.
|
description: Model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/serialize
|
homepage: https://github.com/angel-dart/serialize
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
/// <reference path="./book.d.ts" />
|
/// <reference path="./book.d.ts" />
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
interface Library {
|
declare module 'angel_serialize_generator' {
|
||||||
id?: string;
|
interface Library {
|
||||||
collection?: LibraryCollection;
|
id?: string;
|
||||||
created_at?: any;
|
collection?: LibraryCollection;
|
||||||
updated_at?: any;
|
created_at?: any;
|
||||||
}
|
updated_at?: any;
|
||||||
interface LibraryCollection {
|
}
|
||||||
[key: string]: Book;
|
interface LibraryCollection {
|
||||||
}
|
[key: string]: Book;
|
||||||
interface Bookmark {
|
}
|
||||||
id?: string;
|
interface Bookmark {
|
||||||
history?: number[];
|
id?: string;
|
||||||
page: number;
|
history?: number[];
|
||||||
comment?: string;
|
page: number;
|
||||||
created_at?: any;
|
comment?: string;
|
||||||
updated_at?: any;
|
created_at?: any;
|
||||||
|
updated_at?: any;
|
||||||
|
}
|
||||||
}
|
}
|
22
angel_serialize_generator/test/models/book.d.ts
vendored
22
angel_serialize_generator/test/models/book.d.ts
vendored
|
@ -1,12 +1,14 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
interface Book {
|
declare module 'angel_serialize_generator' {
|
||||||
id?: string;
|
interface Book {
|
||||||
author?: string;
|
id?: string;
|
||||||
title?: string;
|
author?: string;
|
||||||
description?: string;
|
title?: string;
|
||||||
page_count?: number;
|
description?: string;
|
||||||
not_models?: number[];
|
page_count?: number;
|
||||||
camelCase?: string;
|
not_models?: number[];
|
||||||
created_at?: any;
|
camelCase?: string;
|
||||||
updated_at?: any;
|
created_at?: any;
|
||||||
|
updated_at?: any;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue