Skip to content

Commit

Permalink
Add TypeScript declarations to iron-demo-helpers. (#71)
Browse files Browse the repository at this point in the history
* Generate minimal package.json from bower.json
* Update and/or configure type declarations.
  • Loading branch information
aomarks authored Mar 8, 2018
1 parent 9221b3a commit d48db49
Show file tree
Hide file tree
Showing 7 changed files with 1,118 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bower_components*
bower-*.json
node_modules
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ sudo: required
before_script:
- npm install -g polymer-cli
- polymer install --variants
- >-
npm run update-types && git diff --exit-code || (echo -e
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
update-types".' && false)
node_js: stable
addons:
firefox: latest
Expand Down
14 changes: 14 additions & 0 deletions demo-pages-shared-styles.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* demo-pages-shared-styles.html
*/

/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../iron-flex-layout/iron-flex-layout.d.ts" />
/// <reference path="../font-roboto/roboto.d.ts" />

59 changes: 59 additions & 0 deletions demo-snippet.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* demo-snippet.html
*/

/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../marked-element/marked-element.d.ts" />
/// <reference path="../prism-element/prism-highlighter.d.ts" />
/// <reference path="../prism-element/prism-theme-default.d.ts" />

/**
* `demo-snippet` is a helper element that displays the source of a code snippet and
* its rendered demo. It can be used for both native elements and
* Polymer elements.
*
* Example of a native element demo
*
* <demo-snippet>
* <template>
* <input type="date">
* </template>
* </demo-snippet>
*
* Example of a Polymer <paper-checkbox> demo
*
* <demo-snippet>
* <template>
* <paper-checkbox>Checkbox</paper-checkbox>
* <paper-checkbox checked>Checkbox</paper-checkbox>
* </template>
* </demo-snippet>
*
* ### Styling
*
* The following custom properties and mixins are available for styling:
*
* Custom property | Description | Default
* ----------------|-------------|----------
* `--demo-snippet` | Mixin applied to the entire element | `{}`
* `--demo-snippet-demo` | Mixin applied to just the demo section | `{}`
* `--demo-snippet-code` | Mixin applied to just the code section | `{}`
*/
interface DemoSnippetElement extends Polymer.Element {
_markdown: string|null|undefined;
attached(): void;
detached(): void;
_updateMarkdown(): void;
_copyToClipboard(): any;
_resetCopyButtonState(): void;
}

interface HTMLElementTagNameMap {
"demo-snippet": DemoSnippetElement;
}
Loading

0 comments on commit d48db49

Please sign in to comment.