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

ng1-shift

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng1-shift - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.editorconfig

57

index.d.ts

@@ -76,8 +76,48 @@ export interface Component {

* @Component({
* template: `
* Bank Name: {{bankName}}
* Account Id: {{id}}
* `
* template: require("some.html")
* })
*
* class App {
* @Input test: string;
* }
* ```
*/
(bindingPropertyName?: string): any;
new (bindingPropertyName?: string): any;
}
/**
* Type of the Output metadata.
*/
export interface Output {
/**
* Name used when instantiating a component in the template.
*/
bindingPropertyName?: string;
}
/**
* Output decorator and metadata.
*/
export declare const Output: OutputDecorator;
/**
* Type of the Output decorator / constructor function.
*/
export interface OutputDecorator {
/**
* Declares a data-bound input property.
*
* Angular automatically updates data-bound properties during change detection.
*
* `Output` takes an optional parameter that specifies the name
* used when instantiating a component in the template. When not provided,
* the name of the decorated property is used.
*
* ### Example
*
* The following example creates a component with two input properties.
*
* ```typescript*
* @Component({

@@ -87,3 +127,5 @@ * template: require("some.html")

*
* class App {}
* class App {
* @Output() onRowClick: Function;
* }
* ```

@@ -95,1 +137,6 @@ */

export interface EventEmitter {
emit(event?: any);
subscribe(callback: Function);
}
{
"name": "ng1-shift",
"version": "0.0.3",
"version": "0.0.4",
"description": "Angular 1.5+ decorators for writing Angular2 like.",
"main": "index.js",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest --watchAll",
"postinstall": "npm run build",
"build": "tsc index.ts --module umd --outDir dist",
"start": "rollup -c --watch"
},

@@ -26,3 +29,26 @@ "repository": {

},
"homepage": "https://github.com/readdle/ng1-shift#readme"
"homepage": "https://github.com/readdle/ng1-shift#readme",
"jest": {
"transform": {
".ts": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(\\.(test|spec))\\.ts$",
"moduleFileExtensions": [
"ts",
"js"
]
},
"devDependencies": {
"@types/angular": "1.6.17",
"@types/jest": "19.2.4",
"angular": "1.6.4",
"jest": "20.0.4",
"rollup": "0.41.6",
"rollup-plugin-alias": "1.3.1",
"rollup-plugin-typescript": "0.8.1",
"rollup-watch": "3.2.2",
"ts-jest": "20.0.5",
"tslib": "1.7.1",
"typescript": "2.3.4"
}
}

@@ -76,2 +76,22 @@ # ng1-shift

## Output
Property decorator for callback bindings. Literary puts binding property name into static object `bindings` as callback binding "&".
```typescript
class CatComponent {
@Output("onAliasCallback") onCallback: Function;
}
```
Equals to:
```typescript
class CatComponent {
static bindings = {
onCallback: "&onAliasCallback"
};
onCallback: Function;
}
```
## Inject

@@ -78,0 +98,0 @@ Parameter decorator for injection. Works a bit differ from **@Inject** in Angular 2.

index.js

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