mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
polymer ts test file
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/// <reference path="./polymer-ts.d.ts"/>
|
||||
|
||||
namespace Components {
|
||||
|
||||
export class TestComponent extends polymer.Base {
|
||||
|
||||
public field: string = 'foo';
|
||||
public is: string;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.is = 'test-test';
|
||||
}
|
||||
|
||||
public ready(): void {
|
||||
console.log('ready');
|
||||
this.async(() => {
|
||||
console.log('delayed');
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
polymer.createElement(TestComponent);
|
||||
|
||||
@component('test-annotated')
|
||||
export class AnnotatedComponent extends polymer.Base {
|
||||
|
||||
public field: string = 'xx';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ready(): void {
|
||||
console.log('annotated ready');
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+1
-6
@@ -1,8 +1,3 @@
|
||||
// Type definitions for PolymerTS 0.1.17
|
||||
// Project: https://github.com/nippur72/PolymerTS
|
||||
// Definitions by: Louis Grignon <https://github.com/lgrignon/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module polymer {
|
||||
class PolymerBase extends HTMLElement {
|
||||
$: any;
|
||||
@@ -93,7 +88,7 @@ declare module polymer {
|
||||
type?: any;
|
||||
value?: any;
|
||||
reflectToAttribute?: boolean;
|
||||
readonly?: boolean;
|
||||
readOnly?: boolean;
|
||||
notify?: boolean;
|
||||
computed?: string;
|
||||
observer?: string;
|
||||
|
||||
Reference in New Issue
Block a user