diff --git a/bower.json b/bower.json index aef4717..94d274a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-metadata", - "version": "1.0.0-rc.1.0.0", + "version": "1.0.0-rc.1.0.1", "description": "Utilities for reading and writing the metadata of JavaScript functions.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-metadata.js b/dist/amd/aurelia-metadata.js index 6c984b0..a3edc55 100644 --- a/dist/amd/aurelia-metadata.js +++ b/dist/amd/aurelia-metadata.js @@ -29,6 +29,7 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) { var metadata = exports.metadata = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get: function get(metadataKey, target, targetKey) { if (!target) { diff --git a/dist/aurelia-metadata.d.ts b/dist/aurelia-metadata.d.ts index 82743a9..eb761f8 100644 --- a/dist/aurelia-metadata.d.ts +++ b/dist/aurelia-metadata.d.ts @@ -4,6 +4,8 @@ import { /** * Helpers for working with metadata on functions. +* +* Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter. */ export declare interface MetadataType { @@ -17,6 +19,11 @@ export declare interface MetadataType { */ paramTypes: string; + /** + * The metadata key representing object property type information. + */ + propertyType: string; + /** * The metadata key representing property information. */ diff --git a/dist/aurelia-metadata.js b/dist/aurelia-metadata.js index 7a6129e..cba6f3c 100644 --- a/dist/aurelia-metadata.js +++ b/dist/aurelia-metadata.js @@ -2,6 +2,8 @@ import {PLATFORM} from 'aurelia-pal'; /** * Helpers for working with metadata on functions. +* +* Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter. */ interface MetadataType { /** @@ -13,6 +15,10 @@ interface MetadataType { */ paramTypes: string; /** + * The metadata key representing object property type information. + */ + propertyType: string; + /** * The metadata key representing property information. */ properties: string; @@ -53,6 +59,7 @@ interface MetadataType { export const metadata: MetadataType = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get(metadataKey: string, target: Function, targetKey?: string): Object { if (!target) { return undefined; } diff --git a/dist/commonjs/aurelia-metadata.js b/dist/commonjs/aurelia-metadata.js index 4056af5..d1a1f9d 100644 --- a/dist/commonjs/aurelia-metadata.js +++ b/dist/commonjs/aurelia-metadata.js @@ -19,6 +19,7 @@ var _aureliaPal = require('aurelia-pal'); var metadata = exports.metadata = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get: function get(metadataKey, target, targetKey) { if (!target) { diff --git a/dist/es2015/aurelia-metadata.js b/dist/es2015/aurelia-metadata.js index d219df5..9fbd672 100644 --- a/dist/es2015/aurelia-metadata.js +++ b/dist/es2015/aurelia-metadata.js @@ -5,6 +5,7 @@ import { PLATFORM } from 'aurelia-pal'; export const metadata = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get(metadataKey, target, targetKey) { if (!target) { diff --git a/dist/native-modules/aurelia-metadata.js b/dist/native-modules/aurelia-metadata.js index a09c752..222bc85 100644 --- a/dist/native-modules/aurelia-metadata.js +++ b/dist/native-modules/aurelia-metadata.js @@ -7,6 +7,7 @@ import { PLATFORM } from 'aurelia-pal'; export var metadata = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get: function get(metadataKey, target, targetKey) { if (!target) { diff --git a/dist/system/aurelia-metadata.js b/dist/system/aurelia-metadata.js index a6ba20e..3d577ac 100644 --- a/dist/system/aurelia-metadata.js +++ b/dist/system/aurelia-metadata.js @@ -70,6 +70,7 @@ System.register(['aurelia-pal'], function (_export, _context) { _export('metadata', metadata = { resource: 'aurelia:resource', paramTypes: 'design:paramtypes', + propertyType: 'design:type', properties: 'design:properties', get: function get(metadataKey, target, targetKey) { if (!target) { diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index bb5cdf7..460dd0c 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,8 @@ + +# [1.0.0-rc.1.0.1](https://github.com/aurelia/metadata/compare/1.0.0-rc.1.0.0...v1.0.0-rc.1.0.1) (2016-07-12) + + + # [1.0.0-rc.1.0.0](https://github.com/aurelia/metadata/compare/1.0.0-beta.2.0.1...v1.0.0-rc.1.0.0) (2016-06-22) diff --git a/doc/api.json b/doc/api.json index a38f1b3..b3d9265 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-metadata","children":[{"id":46,"name":"Origin","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A metadata annotation that describes the origin module of the function to which it's attached."},"children":[{"id":49,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Origin metadata."},"signatures":[{"id":50,"name":"new Origin","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Origin metadata."},"parameters":[{"id":51,"name":"moduleId","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":52,"name":"moduleMember","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The member name of the export on the module object from which the item originated.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":47,"name":"moduleId","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":48,"name":"moduleMember","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The member name of the export on the module object from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":53,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":54,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Get the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":55,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to inspect for Origin metadata."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":56,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":57,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Set the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":58,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The Origin metadata to store on the function."},"type":{"type":"reference","name":"Function"}},{"id":59,"name":"origin","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Origin","id":46}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[49]},{"title":"Properties","kind":1024,"children":[47,48]},{"title":"Methods","kind":2048,"children":[53,56]}]},{"id":28,"name":"DecoratorApplicator","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An object capable of applying it's captured decorators to a target."},"children":[{"id":29,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":30,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the decorators to the target."},"parameters":[{"id":31,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target."},"type":{"type":"instrinct","name":"any"}},{"id":32,"name":"key","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"},"type":{"type":"instrinct","name":"string"}},{"id":33,"name":"descriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[29]}]},{"id":34,"name":"DeprecatedOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options that control how the deprected decorator should function at runtime."},"children":[{"id":36,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies whether or not the deprecation should throw an error."},"type":{"type":"instrinct","name":"boolean"}},{"id":35,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies a custom deprecation message."},"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Properties","kind":1024,"children":[36,35]}]},{"id":2,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions."},"children":[{"id":4,"name":"paramTypes","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing parameter type information."},"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"properties","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing property information."},"type":{"type":"instrinct","name":"string"}},{"id":3,"name":"resource","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing pluggable resources."},"type":{"type":"instrinct","name":"string"}},{"id":16,"name":"define","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":17,"name":"define","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines metadata specified by a key on a target."},"parameters":[{"id":18,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to define."},"type":{"type":"instrinct","name":"string"}},{"id":19,"name":"metadataValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":20,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to set the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":21,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to set the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":6,"name":"get","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":7,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, searching up the inheritance hierarchy."},"parameters":[{"id":8,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":9,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":10,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":22,"name":"getOrCreateOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":23,"name":"getOrCreateOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."},"parameters":[{"id":24,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup or create."},"type":{"type":"instrinct","name":"string"}},{"id":25,"name":"Type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The type of metadata to create if existing metadata is not found."},"type":{"type":"reference","name":"Function"}},{"id":26,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup or create the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":27,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup or create the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":11,"name":"getOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":12,"name":"getOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, only searching the own instance."},"parameters":[{"id":13,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":14,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":15,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]}],"groups":[{"title":"Properties","kind":1024,"children":[4,5,3]},{"title":"Methods","kind":2048,"children":[16,6,22,11]}]},{"id":37,"name":"ProtocolOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options used during protocol creation."},"children":[{"id":42,"name":"compose","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."},"type":{"type":"reflection","declaration":{"id":43,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":44,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":45,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}}},{"id":38,"name":"validate","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."},"type":{"type":"reflection","declaration":{"id":39,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":40,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":41,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}}}],"groups":[{"title":"Properties","kind":1024,"children":[42,38]}]},{"id":60,"name":"metadata","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Provides helpers for working with metadata."},"type":{"type":"reference","name":"MetadataType","id":2}},{"id":61,"name":"decorators","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":62,"name":"decorators","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."},"parameters":[{"id":63,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The decorators to apply.\n"},"type":{"type":"reference","isArray":true,"name":"Function"}}],"type":{"type":"reference","name":"DecoratorApplicator","id":28}}]},{"id":64,"name":"deprecated","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":65,"name":"deprecated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables marking methods as deprecated."},"parameters":[{"id":66,"name":"optionsOrTarget","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Options for how the deprected decorator should function at runtime.\n"},"type":{"type":"reference","name":"DeprecatedOptions","id":34}},{"id":67,"name":"maybeKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}},{"id":68,"name":"maybeDescriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":69,"name":"mixin","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":70,"name":"mixin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables mixing behaior into a class."},"parameters":[{"id":71,"name":"behavior","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An object with keys for each method to mix into the target class.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":72,"name":"protocol","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":73,"name":"protocol","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Creates a protocol."},"parameters":[{"id":74,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the protocol."},"type":{"type":"instrinct","name":"string"}},{"id":75,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The validation function or options object used in configuring the protocol.\n"},"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":76,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":77,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":78,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}},{"type":"reference","name":"ProtocolOptions","id":37}]}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Classes","kind":128,"children":[46]},{"title":"Interfaces","kind":256,"children":[28,34,2,37]},{"title":"Variables","kind":32,"children":[60]},{"title":"Functions","kind":64,"children":[61,64,69,72]}]} \ No newline at end of file +{"name":"aurelia-metadata","children":[{"id":47,"name":"Origin","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A metadata annotation that describes the origin module of the function to which it's attached."},"children":[{"id":50,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Origin metadata."},"signatures":[{"id":51,"name":"new Origin","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Origin metadata."},"parameters":[{"id":52,"name":"moduleId","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":53,"name":"moduleMember","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The member name of the export on the module object from which the item originated.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Origin","id":47}}]},{"id":48,"name":"moduleId","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":49,"name":"moduleMember","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The member name of the export on the module object from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":54,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":55,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Get the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":56,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to inspect for Origin metadata."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"Origin","id":47}}]},{"id":57,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":58,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Set the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":59,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The Origin metadata to store on the function."},"type":{"type":"reference","name":"Function"}},{"id":60,"name":"origin","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Origin","id":47}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[50]},{"title":"Properties","kind":1024,"children":[48,49]},{"title":"Methods","kind":2048,"children":[54,57]}]},{"id":29,"name":"DecoratorApplicator","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An object capable of applying it's captured decorators to a target."},"children":[{"id":30,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":31,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the decorators to the target."},"parameters":[{"id":32,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target."},"type":{"type":"instrinct","name":"any"}},{"id":33,"name":"key","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"},"type":{"type":"instrinct","name":"string"}},{"id":34,"name":"descriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[30]}]},{"id":35,"name":"DeprecatedOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options that control how the deprected decorator should function at runtime."},"children":[{"id":37,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies whether or not the deprecation should throw an error."},"type":{"type":"instrinct","name":"boolean"}},{"id":36,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies a custom deprecation message."},"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Properties","kind":1024,"children":[37,36]}]},{"id":2,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions.","text":"Note for the Typescript to ES5 transpiler: Due to the non-standard compliant implementation of 'extends', these methods, when applied to derived classes, will operate on the parent class and not on the child class. This can be circumvented by either transpiling to ES2015 (ES6) or by making the targetKey parameter class-specific eg. by using target.name for the targetKey parameter.\n"},"children":[{"id":4,"name":"paramTypes","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing parameter type information."},"type":{"type":"instrinct","name":"string"}},{"id":6,"name":"properties","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing property information."},"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"propertyType","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing object property type information."},"type":{"type":"instrinct","name":"string"}},{"id":3,"name":"resource","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing pluggable resources."},"type":{"type":"instrinct","name":"string"}},{"id":17,"name":"define","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"define","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines metadata specified by a key on a target."},"parameters":[{"id":19,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to define."},"type":{"type":"instrinct","name":"string"}},{"id":20,"name":"metadataValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":21,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to set the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":22,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to set the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":7,"name":"get","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":8,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, searching up the inheritance hierarchy."},"parameters":[{"id":9,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":10,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":11,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":23,"name":"getOrCreateOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":24,"name":"getOrCreateOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."},"parameters":[{"id":25,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup or create."},"type":{"type":"instrinct","name":"string"}},{"id":26,"name":"Type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The type of metadata to create if existing metadata is not found."},"type":{"type":"reference","name":"Function"}},{"id":27,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup or create the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":28,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup or create the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":12,"name":"getOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":13,"name":"getOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, only searching the own instance."},"parameters":[{"id":14,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":15,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":16,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]}],"groups":[{"title":"Properties","kind":1024,"children":[4,6,5,3]},{"title":"Methods","kind":2048,"children":[17,7,23,12]}]},{"id":38,"name":"ProtocolOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options used during protocol creation."},"children":[{"id":43,"name":"compose","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."},"type":{"type":"reflection","declaration":{"id":44,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":45,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":46,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}}},{"id":39,"name":"validate","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."},"type":{"type":"reflection","declaration":{"id":40,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":41,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":42,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}}}],"groups":[{"title":"Properties","kind":1024,"children":[43,39]}]},{"id":61,"name":"metadata","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Provides helpers for working with metadata."},"type":{"type":"reference","name":"MetadataType","id":2}},{"id":62,"name":"decorators","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":63,"name":"decorators","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."},"parameters":[{"id":64,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The decorators to apply.\n"},"type":{"type":"reference","isArray":true,"name":"Function"}}],"type":{"type":"reference","name":"DecoratorApplicator","id":29}}]},{"id":65,"name":"deprecated","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":66,"name":"deprecated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables marking methods as deprecated."},"parameters":[{"id":67,"name":"optionsOrTarget","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Options for how the deprected decorator should function at runtime.\n"},"type":{"type":"reference","name":"DeprecatedOptions","id":35}},{"id":68,"name":"maybeKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}},{"id":69,"name":"maybeDescriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":70,"name":"mixin","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":71,"name":"mixin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables mixing behaior into a class."},"parameters":[{"id":72,"name":"behavior","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An object with keys for each method to mix into the target class.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":73,"name":"protocol","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":74,"name":"protocol","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Creates a protocol."},"parameters":[{"id":75,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the protocol."},"type":{"type":"instrinct","name":"string"}},{"id":76,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The validation function or options object used in configuring the protocol.\n"},"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":77,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":78,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":79,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}},{"type":"reference","name":"ProtocolOptions","id":38}]}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Classes","kind":128,"children":[47]},{"title":"Interfaces","kind":256,"children":[29,35,2,38]},{"title":"Variables","kind":32,"children":[61]},{"title":"Functions","kind":64,"children":[62,65,70,73]}]} \ No newline at end of file diff --git a/package.json b/package.json index 5cf70c9..2dd1439 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-metadata", - "version": "1.0.0-rc.1.0.0", + "version": "1.0.0-rc.1.0.1", "description": "Utilities for reading and writing the metadata of JavaScript functions.", "keywords": [ "aurelia",