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

type-binder

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-binder - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

dist/main/decorators.js.map

2

dist/main/decorators.d.ts
import "reflect-metadata";
import { TypeBinder } from "./type-binder";
export declare function bind(type: any): PropertyDecorator;
export declare function bind(type: any, ...generics: any[]): PropertyDecorator;
export declare function generics(...generics: any[]): PropertyDecorator;

@@ -5,0 +5,0 @@ export declare function track<V>(comparingCallback?: (v1: V, v2: V) => boolean, trackingCallback?: (value: V) => V): PropertyDecorator;

@@ -5,3 +5,12 @@ "use strict";

function bind(type) {
return Reflect.metadata(metadataKeys.designType, type);
var generics = [];
for (var _i = 1; _i < arguments.length; _i++) {
generics[_i - 1] = arguments[_i];
}
return function (target, key) {
Reflect.defineMetadata(metadataKeys.designType, type, target, key);
if (generics.length > 0) {
Reflect.defineMetadata(metadataKeys.designGenericTypes, generics, target, key);
}
};
}

@@ -12,3 +21,3 @@ exports.bind = bind;

for (var _i = 0; _i < arguments.length; _i++) {
generics[_i - 0] = arguments[_i];
generics[_i] = arguments[_i];
}

@@ -43,1 +52,3 @@ return Reflect.metadata(metadataKeys.designGenericTypes, generics);

exports.identifier = identifier;
//# sourceMappingURL=decorators.js.map

@@ -9,1 +9,3 @@ "use strict";

__export(require("./decorators"));
//# sourceMappingURL=index.js.map

@@ -14,1 +14,3 @@ "use strict";

exports.binderIdentifierScope = "binder:identifier:scope";
//# sourceMappingURL=metadata-keys.js.map

@@ -114,1 +114,3 @@ "use strict";

exports.TypeBinder = TypeBinder;
//# sourceMappingURL=type-binder.js.map

@@ -121,1 +121,3 @@ "use strict";

});
//# sourceMappingURL=type-binder.js.map

@@ -9,6 +9,6 @@ import gulp from "gulp";

import typescript from "typescript";
import typings from "gulp-typings";
import gts from "gulp-typescript";
import sass from "gulp-sass";
import merge from "merge2";
import sourcemaps from "gulp-sourcemaps";
import tsconfig from "./tsconfig.json";

@@ -20,3 +20,2 @@ import pkconfig from "./package.json";

};
const typingsConfig = "src/typings.json";
const typescriptSources = [ tsconfig.compilerOptions.rootDir + "/**/*.ts" ];

@@ -32,7 +31,6 @@ const htmlSources = [ tsconfig.compilerOptions.rootDir + "/**/*.html" ];

gulp.task("clean", done => gulp.src(clean).pipe(paths(del)));
gulp.task("typings", done => gulp.src(typingsConfig).pipe(typings()));
gulp.task("build-typescript", [ "typings" ], done => {
let stream = gulp.src(typescriptSources).pipe(tsc);
gulp.task("build-typescript", done => {
let stream = gulp.src(typescriptSources).pipe(sourcemaps.init()).pipe(tsc);
return merge([
stream.js.pipe(gulp.dest(output)),
stream.js.pipe(sourcemaps.write(".", { mapSources: sourcePath => "../" + sourcePath })).pipe(gulp.dest(output)),
stream.dts.pipe(gulp.dest(output))

@@ -39,0 +37,0 @@ ]);

{
"name": "type-binder",
"version": "0.2.0",
"version": "0.2.1",
"description": "A JavaScript type-binder.",

@@ -26,2 +26,3 @@ "keywords": [

"devDependencies": {
"@types/jasmine": "^2.5.38",
"babel-preset-es2015": "^6.18.0",

@@ -32,5 +33,5 @@ "babel-register": "^6.18.0",

"gulp-jasmine": "^2.4.2",
"gulp-sass": "^2.3.2",
"gulp-sass": "^3.0.0",
"gulp-sourcemaps": "^1.9.1",
"gulp-typescript": "^3.1.3",
"gulp-typings": "^2.0.4",
"jasmine": "^2.5.2",

@@ -40,3 +41,3 @@ "jasmine-reporters": "^2.2.0",

"run-sequence": "^1.2.2",
"typescript": "^2.1.1",
"typescript": "^2.1.4",
"vinyl-paths": "^2.1.0"

@@ -43,0 +44,0 @@ },

@@ -5,4 +5,9 @@ import "reflect-metadata";

export function bind(type: any): PropertyDecorator {
return Reflect.metadata(metadataKeys.designType, type);
export function bind(type: any, ...generics: any[]): PropertyDecorator {
return (target: Function, key: string) => {
Reflect.defineMetadata(metadataKeys.designType, type, target, key);
if (generics.length > 0) {
Reflect.defineMetadata(metadataKeys.designGenericTypes, generics, target, key);
}
};
}

@@ -9,0 +14,0 @@

@@ -6,4 +6,6 @@ {

"target": "es5",
"lib": ["es2015", "dom"],
"lib": [ "es2017", "dom" ],
"types": [ "jasmine" ],
"declaration": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,

@@ -10,0 +12,0 @@ "emitDecoratorMetadata": true

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