aurelia-metadata
Advanced tools
Comparing version 1.0.0-beta.1.1.6 to 1.0.0-beta.1.2.0
{ | ||
"name": "aurelia-metadata", | ||
"version": "1.0.0-beta.1.1.6", | ||
"version": "1.0.0-beta.1.2.0", | ||
"description": "Utilities for reading and writing the metadata of JavaScript functions.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
var path = require('path'); | ||
var paths = require('./paths'); | ||
module.exports = { | ||
filename: '', | ||
filenameRelative: '', | ||
modules: '', | ||
sourceMap: true, | ||
sourceMapName: '', | ||
sourceRoot: '', | ||
moduleRoot: path.resolve('src').replace(/\\/g, '/'), | ||
moduleIds: false, | ||
experimental: false, | ||
comments: false, | ||
compact: false, | ||
code:true, | ||
stage:2, | ||
loose: "all", | ||
optional: [ | ||
"es7.decorators", | ||
"es7.classProperties" | ||
], | ||
plugins: [ | ||
"babel-dts-generator" | ||
], | ||
extra: { | ||
dts: { | ||
packageName: paths.packageName, | ||
typings: '', | ||
suppressModulePath: true, | ||
suppressComments: false, | ||
memberOutputFilter: /^_.*/ | ||
} | ||
} | ||
exports.base = function() { | ||
return { | ||
filename: '', | ||
filenameRelative: '', | ||
sourceMap: true, | ||
sourceRoot: '', | ||
moduleRoot: path.resolve('src').replace(/\\/g, '/'), | ||
moduleIds: false, | ||
comments: false, | ||
compact: false, | ||
code:true, | ||
presets: [ 'es2015-loose', 'stage-1'], | ||
plugins: [ | ||
'syntax-flow', | ||
'transform-decorators-legacy', | ||
['babel-dts-generator', { | ||
packageName: paths.packageName, | ||
typings: '', | ||
suppressModulePath: true, | ||
suppressComments: false, | ||
memberOutputFilter: /^_.*/ | ||
}], | ||
'transform-flow-strip-types' | ||
] | ||
}; | ||
} | ||
exports.commonjs = function() { | ||
var options = exports.base(); | ||
options.plugins.push('transform-es2015-modules-commonjs'); | ||
return options; | ||
}; | ||
exports.amd = function() { | ||
var options = exports.base(); | ||
options.plugins.push('transform-es2015-modules-amd'); | ||
return options; | ||
}; | ||
exports.system = function() { | ||
var options = exports.base(); | ||
options.plugins.push('transform-es2015-modules-systemjs'); | ||
return options; | ||
}; | ||
exports.es2015 = function() { | ||
var options = exports.base(); | ||
options.presets = ['stage-1'] | ||
return options; | ||
}; |
@@ -41,5 +41,6 @@ var gulp = require('gulp'); | ||
gulp.task('build-es6', function () { | ||
gulp.task('build-es2015', function () { | ||
return gulp.src(paths.output + jsName) | ||
.pipe(gulp.dest(paths.output + 'es6')); | ||
.pipe(to5(assign({}, compilerOptions.es2015()))) | ||
.pipe(gulp.dest(paths.output + 'es2015')); | ||
}); | ||
@@ -49,3 +50,3 @@ | ||
return gulp.src(paths.output + jsName) | ||
.pipe(to5(assign({}, compilerOptions, {modules:'common'}))) | ||
.pipe(to5(assign({}, compilerOptions.commonjs()))) | ||
.pipe(gulp.dest(paths.output + 'commonjs')); | ||
@@ -56,3 +57,3 @@ }); | ||
return gulp.src(paths.output + jsName) | ||
.pipe(to5(assign({}, compilerOptions, {modules:'amd'}))) | ||
.pipe(to5(assign({}, compilerOptions.amd()))) | ||
.pipe(gulp.dest(paths.output + 'amd')); | ||
@@ -63,3 +64,3 @@ }); | ||
return gulp.src(paths.output + jsName) | ||
.pipe(to5(assign({}, compilerOptions, {modules:'system'}))) | ||
.pipe(to5(assign({}, compilerOptions.system()))) | ||
.pipe(gulp.dest(paths.output + 'system')); | ||
@@ -71,3 +72,3 @@ }); | ||
.pipe(rename(paths.packageName + '.d.ts')) | ||
.pipe(gulp.dest(paths.output + 'es6')) | ||
.pipe(gulp.dest(paths.output + 'es2015')) | ||
.pipe(gulp.dest(paths.output + 'commonjs')) | ||
@@ -82,3 +83,3 @@ .pipe(gulp.dest(paths.output + 'amd')) | ||
'build-index', | ||
['build-es6', 'build-commonjs', 'build-amd', 'build-system'], | ||
['build-es2015', 'build-commonjs', 'build-amd', 'build-system'], | ||
'build-dts', | ||
@@ -85,0 +86,0 @@ callback |
declare module 'aurelia-metadata' { | ||
import { PLATFORM } from 'aurelia-pal'; | ||
import { | ||
PLATFORM | ||
} from 'aurelia-pal'; | ||
@@ -108,2 +110,5 @@ /** | ||
*/ | ||
/** | ||
* Provides helpers for working with metadata. | ||
*/ | ||
export const metadata: MetadataType; | ||
@@ -153,2 +158,6 @@ | ||
*/ | ||
/** | ||
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016. | ||
* @param rest The decorators to apply. | ||
*/ | ||
export function decorators(...rest: Function[]): DecoratorApplicator; | ||
@@ -160,2 +169,6 @@ | ||
*/ | ||
/** | ||
* Decorator: Enables marking methods as deprecated. | ||
* @param optionsOrTarget Options for how the deprected decorator should function at runtime. | ||
*/ | ||
export function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any; | ||
@@ -174,3 +187,8 @@ | ||
*/ | ||
/** | ||
* Decorator: Creates a protocol. | ||
* @param name The name of the protocol. | ||
* @param options The validation function or options object used in configuring the protocol. | ||
*/ | ||
export function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any; | ||
} |
define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) { | ||
'use strict'; | ||
exports.__esModule = true; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.Origin = exports.metadata = undefined; | ||
exports.decorators = decorators; | ||
@@ -13,5 +13,23 @@ exports.deprecated = deprecated; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
var metadata = { | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
var metadata = exports.metadata = { | ||
resource: 'aurelia:resource', | ||
@@ -48,7 +66,6 @@ paramTypes: 'design:paramtypes', | ||
exports.metadata = metadata; | ||
var originStorage = new Map(); | ||
var unknownOrigin = Object.freeze({ moduleId: undefined, moduleMember: undefined }); | ||
var Origin = (function () { | ||
var Origin = exports.Origin = function () { | ||
function Origin(moduleId, moduleMember) { | ||
@@ -66,6 +83,6 @@ _classCallCheck(this, Origin); | ||
_aureliaPal.PLATFORM.eachModule(function (key, value) { | ||
for (var _name in value) { | ||
var exp = value[_name]; | ||
for (var name in value) { | ||
var exp = value[name]; | ||
if (exp === fn) { | ||
originStorage.set(fn, origin = new Origin(key, _name)); | ||
originStorage.set(fn, origin = new Origin(key, name)); | ||
return true; | ||
@@ -90,6 +107,4 @@ } | ||
return Origin; | ||
})(); | ||
}(); | ||
exports.Origin = Origin; | ||
function decorators() { | ||
@@ -96,0 +111,0 @@ for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) { |
declare module 'aurelia-metadata' { | ||
import { PLATFORM } from 'aurelia-pal'; | ||
import { | ||
PLATFORM | ||
} from 'aurelia-pal'; | ||
@@ -108,2 +110,5 @@ /** | ||
*/ | ||
/** | ||
* Provides helpers for working with metadata. | ||
*/ | ||
export const metadata: MetadataType; | ||
@@ -153,2 +158,6 @@ | ||
*/ | ||
/** | ||
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016. | ||
* @param rest The decorators to apply. | ||
*/ | ||
export function decorators(...rest: Function[]): DecoratorApplicator; | ||
@@ -160,2 +169,6 @@ | ||
*/ | ||
/** | ||
* Decorator: Enables marking methods as deprecated. | ||
* @param optionsOrTarget Options for how the deprected decorator should function at runtime. | ||
*/ | ||
export function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any; | ||
@@ -174,3 +187,8 @@ | ||
*/ | ||
/** | ||
* Decorator: Creates a protocol. | ||
* @param name The name of the protocol. | ||
* @param options The validation function or options object used in configuring the protocol. | ||
*/ | ||
export function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any; | ||
} |
declare module 'aurelia-metadata' { | ||
import { PLATFORM } from 'aurelia-pal'; | ||
import { | ||
PLATFORM | ||
} from 'aurelia-pal'; | ||
@@ -108,2 +110,5 @@ /** | ||
*/ | ||
/** | ||
* Provides helpers for working with metadata. | ||
*/ | ||
export const metadata: MetadataType; | ||
@@ -153,2 +158,6 @@ | ||
*/ | ||
/** | ||
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016. | ||
* @param rest The decorators to apply. | ||
*/ | ||
export function decorators(...rest: Function[]): DecoratorApplicator; | ||
@@ -160,2 +169,6 @@ | ||
*/ | ||
/** | ||
* Decorator: Enables marking methods as deprecated. | ||
* @param optionsOrTarget Options for how the deprected decorator should function at runtime. | ||
*/ | ||
export function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any; | ||
@@ -174,3 +187,8 @@ | ||
*/ | ||
/** | ||
* Decorator: Creates a protocol. | ||
* @param name The name of the protocol. | ||
* @param options The validation function or options object used in configuring the protocol. | ||
*/ | ||
export function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any; | ||
} |
'use strict'; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.Origin = exports.metadata = undefined; | ||
@@ -12,7 +15,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var _aureliaPal = require('aurelia-pal'); | ||
var metadata = { | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var metadata = exports.metadata = { | ||
resource: 'aurelia:resource', | ||
@@ -49,7 +52,6 @@ paramTypes: 'design:paramtypes', | ||
exports.metadata = metadata; | ||
var originStorage = new Map(); | ||
var unknownOrigin = Object.freeze({ moduleId: undefined, moduleMember: undefined }); | ||
var Origin = (function () { | ||
var Origin = exports.Origin = function () { | ||
function Origin(moduleId, moduleMember) { | ||
@@ -67,6 +69,6 @@ _classCallCheck(this, Origin); | ||
_aureliaPal.PLATFORM.eachModule(function (key, value) { | ||
for (var _name in value) { | ||
var exp = value[_name]; | ||
for (var name in value) { | ||
var exp = value[name]; | ||
if (exp === fn) { | ||
originStorage.set(fn, origin = new Origin(key, _name)); | ||
originStorage.set(fn, origin = new Origin(key, name)); | ||
return true; | ||
@@ -91,6 +93,4 @@ } | ||
return Origin; | ||
})(); | ||
}(); | ||
exports.Origin = Origin; | ||
function decorators() { | ||
@@ -97,0 +97,0 @@ for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) { |
declare module 'aurelia-metadata' { | ||
import { PLATFORM } from 'aurelia-pal'; | ||
import { | ||
PLATFORM | ||
} from 'aurelia-pal'; | ||
@@ -108,2 +110,5 @@ /** | ||
*/ | ||
/** | ||
* Provides helpers for working with metadata. | ||
*/ | ||
export const metadata: MetadataType; | ||
@@ -153,2 +158,6 @@ | ||
*/ | ||
/** | ||
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016. | ||
* @param rest The decorators to apply. | ||
*/ | ||
export function decorators(...rest: Function[]): DecoratorApplicator; | ||
@@ -160,2 +169,6 @@ | ||
*/ | ||
/** | ||
* Decorator: Enables marking methods as deprecated. | ||
* @param optionsOrTarget Options for how the deprected decorator should function at runtime. | ||
*/ | ||
export function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any; | ||
@@ -174,3 +187,8 @@ | ||
*/ | ||
/** | ||
* Decorator: Creates a protocol. | ||
* @param name The name of the protocol. | ||
* @param options The validation function or options object used in configuring the protocol. | ||
*/ | ||
export function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any; | ||
} |
@@ -1,105 +0,12 @@ | ||
System.register(['aurelia-pal'], function (_export) { | ||
'use strict'; | ||
'use strict'; | ||
var PLATFORM, metadata, originStorage, unknownOrigin, Origin; | ||
System.register(['aurelia-pal'], function (_export, _context) { | ||
var PLATFORM, _extends, metadata, originStorage, unknownOrigin, Origin; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_export('decorators', decorators); | ||
_export('deprecated', deprecated); | ||
_export('mixin', mixin); | ||
_export('protocol', protocol); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function decorators() { | ||
for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) { | ||
rest[_key] = arguments[_key]; | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
var applicator = function applicator(target, key, descriptor) { | ||
var i = rest.length; | ||
if (key) { | ||
descriptor = descriptor || { | ||
value: target[key], | ||
writable: true, | ||
configurable: true, | ||
enumerable: true | ||
}; | ||
while (i--) { | ||
descriptor = rest[i](target, key, descriptor) || descriptor; | ||
} | ||
Object.defineProperty(target, key, descriptor); | ||
} else { | ||
while (i--) { | ||
target = rest[i](target) || target; | ||
} | ||
} | ||
return target; | ||
}; | ||
applicator.on = applicator; | ||
return applicator; | ||
} | ||
function deprecated(optionsOrTarget, maybeKey, maybeDescriptor) { | ||
function decorator(target, key, descriptor) { | ||
var methodSignature = target.constructor.name + '#' + key; | ||
var options = maybeKey ? {} : optionsOrTarget || {}; | ||
var message = 'DEPRECATION - ' + methodSignature; | ||
if (typeof descriptor.value !== 'function') { | ||
throw new SyntaxError('Only methods can be marked as deprecated.'); | ||
} | ||
if (options.message) { | ||
message += ' - ' + options.message; | ||
} | ||
return _extends({}, descriptor, { | ||
value: function deprecationWrapper() { | ||
if (options.error) { | ||
throw new Error(message); | ||
} else { | ||
console.warn(message); | ||
} | ||
return descriptor.value.apply(this, arguments); | ||
} | ||
}); | ||
} | ||
return maybeKey ? decorator(optionsOrTarget, maybeKey, maybeDescriptor) : decorator; | ||
} | ||
function mixin(behavior) { | ||
var instanceKeys = Object.keys(behavior); | ||
function _mixin(possible) { | ||
var decorator = function decorator(target) { | ||
var resolvedTarget = typeof target === 'function' ? target.prototype : target; | ||
var i = instanceKeys.length; | ||
while (i--) { | ||
var property = instanceKeys[i]; | ||
Object.defineProperty(resolvedTarget, property, { | ||
value: behavior[property], | ||
writable: true | ||
}); | ||
} | ||
}; | ||
return possible ? decorator(possible) : decorator; | ||
} | ||
return _mixin; | ||
} | ||
function alwaysValid() { | ||
@@ -146,25 +53,2 @@ return true; | ||
function protocol(name, options) { | ||
options = ensureProtocolOptions(options); | ||
var result = function result(target) { | ||
var resolvedTarget = typeof target === 'function' ? target.prototype : target; | ||
options.compose(resolvedTarget); | ||
result.assert(resolvedTarget); | ||
Object.defineProperty(resolvedTarget, 'protocol:' + name, { | ||
enumerable: false, | ||
configurable: false, | ||
writable: false, | ||
value: true | ||
}); | ||
}; | ||
result.validate = createProtocolValidator(options.validate); | ||
result.assert = createProtocolAsserter(name, options.validate); | ||
return result; | ||
} | ||
return { | ||
@@ -175,3 +59,17 @@ setters: [function (_aureliaPal) { | ||
execute: function () { | ||
metadata = { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
_export('metadata', metadata = { | ||
resource: 'aurelia:resource', | ||
@@ -206,3 +104,3 @@ paramTypes: 'design:paramtypes', | ||
} | ||
}; | ||
}); | ||
@@ -214,3 +112,3 @@ _export('metadata', metadata); | ||
Origin = (function () { | ||
_export('Origin', Origin = function () { | ||
function Origin(moduleId, moduleMember) { | ||
@@ -228,6 +126,6 @@ _classCallCheck(this, Origin); | ||
PLATFORM.eachModule(function (key, value) { | ||
for (var _name in value) { | ||
var exp = value[_name]; | ||
for (var name in value) { | ||
var exp = value[name]; | ||
if (exp === fn) { | ||
originStorage.set(fn, origin = new Origin(key, _name)); | ||
originStorage.set(fn, origin = new Origin(key, name)); | ||
return true; | ||
@@ -252,6 +150,123 @@ } | ||
return Origin; | ||
})(); | ||
}()); | ||
_export('Origin', Origin); | ||
function decorators() { | ||
for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) { | ||
rest[_key] = arguments[_key]; | ||
} | ||
var applicator = function applicator(target, key, descriptor) { | ||
var i = rest.length; | ||
if (key) { | ||
descriptor = descriptor || { | ||
value: target[key], | ||
writable: true, | ||
configurable: true, | ||
enumerable: true | ||
}; | ||
while (i--) { | ||
descriptor = rest[i](target, key, descriptor) || descriptor; | ||
} | ||
Object.defineProperty(target, key, descriptor); | ||
} else { | ||
while (i--) { | ||
target = rest[i](target) || target; | ||
} | ||
} | ||
return target; | ||
}; | ||
applicator.on = applicator; | ||
return applicator; | ||
} | ||
_export('decorators', decorators); | ||
function deprecated(optionsOrTarget, maybeKey, maybeDescriptor) { | ||
function decorator(target, key, descriptor) { | ||
var methodSignature = target.constructor.name + '#' + key; | ||
var options = maybeKey ? {} : optionsOrTarget || {}; | ||
var message = 'DEPRECATION - ' + methodSignature; | ||
if (typeof descriptor.value !== 'function') { | ||
throw new SyntaxError('Only methods can be marked as deprecated.'); | ||
} | ||
if (options.message) { | ||
message += ' - ' + options.message; | ||
} | ||
return _extends({}, descriptor, { | ||
value: function deprecationWrapper() { | ||
if (options.error) { | ||
throw new Error(message); | ||
} else { | ||
console.warn(message); | ||
} | ||
return descriptor.value.apply(this, arguments); | ||
} | ||
}); | ||
} | ||
return maybeKey ? decorator(optionsOrTarget, maybeKey, maybeDescriptor) : decorator; | ||
} | ||
_export('deprecated', deprecated); | ||
function mixin(behavior) { | ||
var instanceKeys = Object.keys(behavior); | ||
function _mixin(possible) { | ||
var decorator = function decorator(target) { | ||
var resolvedTarget = typeof target === 'function' ? target.prototype : target; | ||
var i = instanceKeys.length; | ||
while (i--) { | ||
var property = instanceKeys[i]; | ||
Object.defineProperty(resolvedTarget, property, { | ||
value: behavior[property], | ||
writable: true | ||
}); | ||
} | ||
}; | ||
return possible ? decorator(possible) : decorator; | ||
} | ||
return _mixin; | ||
} | ||
_export('mixin', mixin); | ||
function protocol(name, options) { | ||
options = ensureProtocolOptions(options); | ||
var result = function result(target) { | ||
var resolvedTarget = typeof target === 'function' ? target.prototype : target; | ||
options.compose(resolvedTarget); | ||
result.assert(resolvedTarget); | ||
Object.defineProperty(resolvedTarget, 'protocol:' + name, { | ||
enumerable: false, | ||
configurable: false, | ||
writable: false, | ||
value: true | ||
}); | ||
}; | ||
result.validate = createProtocolValidator(options.validate); | ||
result.assert = createProtocolAsserter(name, options.validate); | ||
return result; | ||
} | ||
_export('protocol', protocol); | ||
protocol.create = function (name, options) { | ||
@@ -258,0 +273,0 @@ options = ensureProtocolOptions(options); |
1226
doc/api.json
@@ -1,1 +0,1225 @@ | ||
{"id":2,"name":"\"aurelia-metadata\"","kind":2,"kindString":"Module","flags":{},"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":3,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions."},"children":[{"id":5,"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":4,"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":{},"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":{},"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":{},"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":{},"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":[5,6,4]},{"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":3}},{"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,3,38]},{"title":"Variables","kind":32,"children":[61]},{"title":"Functions","kind":64,"children":[62,65,70,73]}]} | ||
{ | ||
"id": 2, | ||
"name": "\"aurelia-metadata\"", | ||
"kind": 2, | ||
"kindString": "Module", | ||
"flags": {}, | ||
"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, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"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, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"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, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
} | ||
], | ||
"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": 3, | ||
"name": "MetadataType", | ||
"kind": 256, | ||
"kindString": "Interface", | ||
"flags": { | ||
"isExported": true | ||
}, | ||
"comment": { | ||
"shortText": "Helpers for working with metadata on functions." | ||
}, | ||
"children": [ | ||
{ | ||
"id": 5, | ||
"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": 4, | ||
"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": {}, | ||
"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": {}, | ||
"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": {}, | ||
"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": {}, | ||
"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": [ | ||
5, | ||
6, | ||
4 | ||
] | ||
}, | ||
{ | ||
"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": 3, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
}, | ||
{ | ||
"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, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"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, | ||
"moduleName": "\"aurelia-metadata\"" | ||
} | ||
}, | ||
{ | ||
"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, | ||
3, | ||
38 | ||
] | ||
}, | ||
{ | ||
"title": "Variables", | ||
"kind": 32, | ||
"children": [ | ||
61 | ||
] | ||
}, | ||
{ | ||
"title": "Functions", | ||
"kind": 64, | ||
"children": [ | ||
62, | ||
65, | ||
70, | ||
73 | ||
] | ||
} | ||
] | ||
} |
@@ -0,1 +1,5 @@ | ||
### 1.0.0-beta.1.2.0 (2016-03-22) | ||
* Update to Babel 6 | ||
### 1.0.0-beta.1.1.6 (2016-03-02) | ||
@@ -2,0 +6,0 @@ |
@@ -17,3 +17,3 @@ // Karma configuration | ||
// Edit this to your needs | ||
loadFiles: ['src/**/*.js', 'test/**/*.js'] | ||
loadFiles: ['test/setup.js', 'src/**/*.js', 'test/**/*.js'] | ||
}, | ||
@@ -40,7 +40,7 @@ | ||
sourceMap: 'inline', | ||
modules: 'system', | ||
moduleIds: false, | ||
loose: "all", | ||
optional: [ | ||
"es7.decorators" | ||
presets: [ 'es2015-loose', 'stage-1'], | ||
plugins: [ | ||
'syntax-flow', | ||
'transform-decorators-legacy', | ||
'transform-flow-strip-types' | ||
] | ||
@@ -47,0 +47,0 @@ } |
{ | ||
"name": "aurelia-metadata", | ||
"version": "1.0.0-beta.1.1.6", | ||
"version": "1.0.0-beta.1.2.0", | ||
"description": "Utilities for reading and writing the metadata of JavaScript functions.", | ||
@@ -47,8 +47,17 @@ "keywords": [ | ||
"aurelia-tools": "^0.1.12", | ||
"babel-dts-generator": "^0.2.17", | ||
"babel-dts-generator": "^0.4.7", | ||
"babel-eslint": "^4.1.1", | ||
"babel-plugin-syntax-flow": "^6.5.0", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-plugin-transform-es2015-modules-amd": "^6.6.5", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0", | ||
"babel-plugin-transform-es2015-modules-systemjs": "^6.6.5", | ||
"babel-plugin-transform-flow-strip-types": "^6.7.0", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-stage-1": "^6.5.0", | ||
"conventional-changelog": "0.0.11", | ||
"del": "^1.1.0", | ||
"gulp": "^3.8.10", | ||
"gulp-babel": "^5.2.1", | ||
"gulp-babel": "^6.1.2", | ||
"gulp-bump": "^0.3.1", | ||
@@ -63,3 +72,3 @@ "gulp-concat": "^2.6.0", | ||
"karma": "^0.13.15", | ||
"karma-babel-preprocessor": "^5.2.2", | ||
"karma-babel-preprocessor": "^6.0.1", | ||
"karma-chrome-launcher": "^0.1.7", | ||
@@ -66,0 +75,0 @@ "karma-coverage": "^0.3.1", |
@@ -1,2 +0,1 @@ | ||
import './setup'; | ||
import {metadata} from '../src/metadata'; | ||
@@ -3,0 +2,0 @@ import {decorators} from '../src/decorators'; |
@@ -1,2 +0,1 @@ | ||
import './setup'; | ||
import {mixin} from '../src/mixin'; | ||
@@ -3,0 +2,0 @@ |
@@ -1,2 +0,1 @@ | ||
import './setup'; | ||
import {Origin} from '../src/origin'; | ||
@@ -3,0 +2,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
342785
4433
37