Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

taktik-polymer-typescript

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taktik-polymer-typescript - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

151

dist/src/index.js

@@ -1,77 +0,78 @@

define("taktik-polymer-typeScript", ["require", "exports", "reflect-metadata", "../type/element", "../type/shadow", "../type/polymer", "../type/iron-ajax", "../type/missing"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
;
function customElement(tagname) {
return (clazz) => {
clazz.is = tagname;
window[clazz.name] = clazz; // Register class in windows se that is can be use without IMD module loading.
// Useful for import in pure JS project.
window.customElements.define(tagname, clazz);
/**
* A TypeScript class decorator that defines a custom element with name
* `tagname` and the decorated class.
*/
import 'reflect-metadata';
import '../type/element';
import '../type/shadow';
import '../type/polymer';
import '../type/iron-ajax';
import '../type/missing';
;
export function customElement(tagname) {
return (clazz) => {
clazz.is = tagname;
window[clazz.name] = clazz; // Register class in windows se that is can be use without IMD module loading.
// Useful for import in pure JS project.
window.customElements.define(tagname, clazz);
};
}
/**
* A TypeScript class decorator that declare a global class
* `tagname` and the decorated class.
*/
export function jsElement() {
return (clazz) => {
window[clazz.name] = clazz; // Register class in windows se that is can be use without IMD module loading.
// Useful for import in pure JS project.
};
}
;
/**
* A TypeScript property decorator factory that defines this as a Polymer
* property.
*
* This function must be invoked to return a decorator.
*/
export function property(options) {
return (proto, propName) => {
const notify = (options && options.notify);
const type = Reflect.getMetadata("design:type", proto, propName);
const config = _ensureConfig(proto);
config.properties[propName] = {
type,
notify,
};
};
}
export function domElement() {
return (proto, propName) => {
};
}
/**
* A TypeScript property decorator factory that causes the decorated method to
* be called when a property changes. `targets` is either a single property
* name, or a list of property names.
*
* This function must be invoked to return a decorator.
*/
export function observe(targets) {
return (proto, propName) => {
const targetString = typeof targets === 'string' ? targets : targets.join(',');
const config = _ensureConfig(proto);
config.observers.push(`${propName}(${targetString})`);
};
}
function _ensureConfig(proto) {
const ctor = proto.constructor;
if (ctor.hasOwnProperty('__polymer_ts_config')) {
return ctor.__polymer_ts_config;
}
exports.customElement = customElement;
/**
* A TypeScript class decorator that declare a global class
* `tagname` and the decorated class.
*/
function jsElement() {
return (clazz) => {
window[clazz.name] = clazz; // Register class in windows se that is can be use without IMD module loading.
// Useful for import in pure JS project.
};
}
exports.jsElement = jsElement;
;
/**
* A TypeScript property decorator factory that defines this as a Polymer
* property.
*
* This function must be invoked to return a decorator.
*/
function property(options) {
return (proto, propName) => {
const notify = (options && options.notify);
const type = Reflect.getMetadata("design:type", proto, propName);
const config = _ensureConfig(proto);
config.properties[propName] = {
type,
notify,
};
};
}
exports.property = property;
function domElement() {
return (proto, propName) => {
};
}
exports.domElement = domElement;
/**
* A TypeScript property decorator factory that causes the decorated method to
* be called when a property changes. `targets` is either a single property
* name, or a list of property names.
*
* This function must be invoked to return a decorator.
*/
function observe(targets) {
return (proto, propName) => {
const targetString = typeof targets === 'string' ? targets : targets.join(',');
const config = _ensureConfig(proto);
config.observers.push(`${propName}(${targetString})`);
};
}
exports.observe = observe;
function _ensureConfig(proto) {
const ctor = proto.constructor;
if (ctor.hasOwnProperty('__polymer_ts_config')) {
return ctor.__polymer_ts_config;
}
Object.defineProperty(ctor, 'config', {
get() { return ctor.__polymer_ts_config; }
});
const config = ctor.__polymer_ts_config = ctor.__polymer_ts_config || {};
config.properties = config.properties || {};
config.observers = config.observers || [];
return config;
}
});
Object.defineProperty(ctor, 'config', {
get() { return ctor.__polymer_ts_config; }
});
const config = ctor.__polymer_ts_config = ctor.__polymer_ts_config || {};
config.properties = config.properties || {};
config.observers = config.observers || [];
return config;
}
{
"name": "taktik-polymer-typescript",
"version": "2.1.0",
"version": "2.2.0",
"description": "Module providing development facilities for ozone polymer type script modules.",

@@ -21,5 +21,4 @@ "main": "dist/src/index.js",

"@types/reflect-metadata": "0.0.5",
"ozone-type": "git+https://git@bitbucket.taktik.be/scm/sandbox/ozone-type.git",
"reflect-metadata": "^0.1.10"
"ozone-type": "git+https://git@bitbucket.taktik.be/scm/sandbox/ozone-type.git"
}
}
{
"compilerOptions": {
"target": "es6",
// Use of ES6
"module": "amd",
// Module strategy that is likely to be use with official Polymer/typeScript support. See PolymerLabs/IMD
"module": "es2015",
"experimentalDecorators": true,

@@ -19,5 +17,2 @@ //

],
"typeRoots": [
"./node_modules/@types"
],
"declaration": true,

@@ -24,0 +19,0 @@ "outDir": "./dist",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc