Skip to content

Commit

Permalink
add readonly keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
hwanseung committed Nov 25, 2017
1 parent fe4af31 commit 5eb7687
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions generator/parser/dictionary_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import IDLDefinition from './idl_definition';
import IDLDictionary from './idl_dictionary';


export default class DictionaryTypes {
dictionaries: IDLDictionary[];
readonly dictionaries: IDLDictionary[];

constructor(definitions: IDLDefinition[]) {
this.dictionaries = [];
Expand Down
2 changes: 1 addition & 1 deletion generator/parser/idl_dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DictionaryMember implements IDLIdentifier {
}

export default class IDLDictionary extends IDLDefinition {
members: DictionaryMember[];
readonly members: DictionaryMember[];

constructor(raw_idl_dic_info: {}) {
super(raw_idl_dic_info['name'], raw_idl_dic_info);
Expand Down
2 changes: 1 addition & 1 deletion template/interface_cpp.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (!EnumValidator::isValildEnum({{argument.name}}, enum_value_set)) {
}
{% elif argument.dictionary %}
{{argument.type | pascalcase}} {{argument.name}};
//FIXME(hwanseung): Make NatvieTypeTraits for dictionary types.
// FIXME(hwanseung): Make NatvieTypeTraits for dictionary types.
{% else %}
auto {{argument.name}} = NativeTypeTraits<IDL{{argument.type | pascalcase-}}
>::NativeValue(info.Env(), info[{{loop.index0}}]);
Expand Down

0 comments on commit 5eb7687

Please sign in to comment.