mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
update types
This commit is contained in:
@@ -1374,4 +1374,30 @@ Polymer_ArraySelectorMixin.prototype.select = function(item){};
|
||||
* @param {number} idx Index from `items` array to select
|
||||
* @return {void}
|
||||
*/
|
||||
Polymer_ArraySelectorMixin.prototype.selectIndex = function(idx){};
|
||||
Polymer_ArraySelectorMixin.prototype.selectIndex = function(idx){};
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
function Polymer_DisableUpgradeMixin(){}
|
||||
/**
|
||||
* @param {*} name
|
||||
* @param {*} old
|
||||
* @param {*} value
|
||||
*/
|
||||
Polymer_DisableUpgradeMixin.prototype.attributeChangedCallback = function(name, old, value){};
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
Polymer_DisableUpgradeMixin.prototype._initializeProperties = function(){};
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
Polymer_DisableUpgradeMixin.prototype.connectedCallback = function(){};
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
Polymer_DisableUpgradeMixin.prototype._enableProperties = function(){};
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
Polymer_DisableUpgradeMixin.prototype.disconnectedCallback = function(){};
|
||||
@@ -79,7 +79,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
Polymer.Class = function(info) {
|
||||
const ctor = polymerClass(info);
|
||||
return Polymer.DisableUpgradeMixin(ctor);
|
||||
}
|
||||
};
|
||||
|
||||
Polymer({
|
||||
is: 'x-disabled-legacy',
|
||||
|
||||
10
types/externs/closure-types.d.ts
vendored
Normal file
10
types/externs/closure-types.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 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):
|
||||
* externs/closure-types.js
|
||||
*/
|
||||
|
||||
10
types/externs/polymer-externs.d.ts
vendored
Normal file
10
types/externs/polymer-externs.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 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):
|
||||
* externs/polymer-externs.js
|
||||
*/
|
||||
|
||||
10
types/externs/polymer-internal-shared-types.d.ts
vendored
Normal file
10
types/externs/polymer-internal-shared-types.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 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):
|
||||
* externs/polymer-internal-shared-types.js
|
||||
*/
|
||||
|
||||
10
types/externs/webcomponents-externs.d.ts
vendored
Normal file
10
types/externs/webcomponents-externs.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 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):
|
||||
* externs/webcomponents-externs.js
|
||||
*/
|
||||
|
||||
18
types/gulpfile.d.ts
vendored
Normal file
18
types/gulpfile.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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):
|
||||
* gulpfile.js
|
||||
*/
|
||||
|
||||
declare class BackfillStream {
|
||||
_transform(file: any, enc: any, cb: any): any;
|
||||
_flush(cb: any): any;
|
||||
}
|
||||
|
||||
declare class AddClosureTypeImport {
|
||||
_transform(file: any, enc: any, cb: any): any;
|
||||
}
|
||||
2
types/lib/elements/array-selector.d.ts
vendored
2
types/lib/elements/array-selector.d.ts
vendored
@@ -29,7 +29,7 @@ declare namespace Polymer {
|
||||
* representing the last selected item. When `multi` is true, `selected`
|
||||
* is an array of multiply selected items.
|
||||
*/
|
||||
function ArraySelectorMixin<T extends new (...args: any[]) => {}>(base: T): T & ArraySelectorMixinConstructor & Polymer.ElementMixinConstructor & Polymer.PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor & Polymer.PropertiesMixinConstructor;
|
||||
function ArraySelectorMixin<T extends new (...args: any[]) => {}>(base: T): T & ArraySelectorMixinConstructor & Polymer.ElementMixinConstructor;
|
||||
|
||||
interface ArraySelectorMixinConstructor {
|
||||
new(...args: any[]): ArraySelectorMixin;
|
||||
|
||||
13
types/lib/elements/dom-module.d.ts
vendored
13
types/lib/elements/dom-module.d.ts
vendored
@@ -33,19 +33,6 @@ declare namespace Polymer {
|
||||
* let img = customElements.get('dom-module').import('foo', 'img');
|
||||
*/
|
||||
class DomModule extends HTMLElement {
|
||||
|
||||
/**
|
||||
* The absolute URL of the original location of this `dom-module`.
|
||||
*
|
||||
* This value will differ from this element's `ownerDocument` in the
|
||||
* following ways:
|
||||
* - Takes into account any `assetpath` attribute added during bundling
|
||||
* to indicate the original location relative to the bundled location
|
||||
* - Uses the HTMLImports polyfill's `importForElement` API to ensure
|
||||
* the path is relative to the import document's location since
|
||||
* `ownerDocument` is not currently polyfilled
|
||||
*
|
||||
*/
|
||||
readonly assetpath: any;
|
||||
|
||||
/**
|
||||
|
||||
2
types/lib/legacy/legacy-element-mixin.d.ts
vendored
2
types/lib/legacy/legacy-element-mixin.d.ts
vendored
@@ -26,7 +26,7 @@ declare namespace Polymer {
|
||||
* found on the Polymer 1.x `Polymer.Base` prototype applied to all elements
|
||||
* defined using the `Polymer({...})` function.
|
||||
*/
|
||||
function LegacyElementMixin<T extends new (...args: any[]) => {}>(base: T): T & LegacyElementMixinConstructor & Polymer.ElementMixinConstructor & Polymer.PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor & Polymer.PropertiesMixinConstructor & Polymer.GestureEventListenersConstructor;
|
||||
function LegacyElementMixin<T extends new (...args: any[]) => {}>(base: T): T & LegacyElementMixinConstructor & Polymer.ElementMixinConstructor & Polymer.GestureEventListenersConstructor;
|
||||
|
||||
interface LegacyElementMixinConstructor {
|
||||
new(...args: any[]): LegacyElementMixin;
|
||||
|
||||
4
types/lib/legacy/mutable-data-behavior.d.ts
vendored
4
types/lib/legacy/mutable-data-behavior.d.ts
vendored
@@ -66,8 +66,6 @@ declare namespace Polymer {
|
||||
_shouldPropertyChange(property: string, value: any, old: any): boolean;
|
||||
}
|
||||
|
||||
const MutableDataBehavior: object;
|
||||
|
||||
/**
|
||||
* Legacy element behavior to add the optional ability to skip strict
|
||||
* dirty-checking for objects and arrays (always consider them to be
|
||||
@@ -130,6 +128,4 @@ declare namespace Polymer {
|
||||
*/
|
||||
_shouldPropertyChange(property: string, value: any, old: any): boolean;
|
||||
}
|
||||
|
||||
const OptionalMutableDataBehavior: object;
|
||||
}
|
||||
|
||||
2
types/lib/legacy/templatizer-behavior.d.ts
vendored
2
types/lib/legacy/templatizer-behavior.d.ts
vendored
@@ -111,6 +111,4 @@ declare namespace Polymer {
|
||||
*/
|
||||
modelForElement(el: HTMLElement|null): TemplateInstanceBase|null;
|
||||
}
|
||||
|
||||
const Templatizer: object;
|
||||
}
|
||||
|
||||
2
types/lib/mixins/dir-mixin.d.ts
vendored
2
types/lib/mixins/dir-mixin.d.ts
vendored
@@ -29,7 +29,7 @@ declare namespace Polymer {
|
||||
* - Changing `dir` at runtime is supported.
|
||||
* - Opting out of the global direction styling is permanent
|
||||
*/
|
||||
function DirMixin<T extends new (...args: any[]) => {}>(base: T): T & DirMixinConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor;
|
||||
function DirMixin<T extends new (...args: any[]) => {}>(base: T): T & DirMixinConstructor & Polymer.PropertyAccessorsConstructor;
|
||||
|
||||
interface DirMixinConstructor {
|
||||
new(...args: any[]): DirMixin;
|
||||
|
||||
65
types/lib/mixins/disable-upgrade-mixin.d.ts
vendored
Normal file
65
types/lib/mixins/disable-upgrade-mixin.d.ts
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 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):
|
||||
* lib/mixins/disable-upgrade-mixin.html
|
||||
*/
|
||||
|
||||
declare namespace Polymer {
|
||||
|
||||
|
||||
/**
|
||||
* Element class mixin that allows the element to boot up in a non-enabled
|
||||
* state when the `disable-upgrade` attribute is present. This mixin is
|
||||
* designed to be used with element classes like Polymer.Element that perform
|
||||
* initial startup work when they are first connected. When the
|
||||
* `disable-upgrade` attribute is removed, if the element is connected, it
|
||||
* boots up and "enables" as it otherwise would; if it is not connected, the
|
||||
* element boots up when it is next connected.
|
||||
*
|
||||
* Using `disable-upgrade` with Polymer.Element prevents any data propagation
|
||||
* to the element, any element DOM from stamping, or any work done in
|
||||
* connected/disconnctedCallback from occuring, but it does not prevent work
|
||||
* done in the element constructor.
|
||||
*
|
||||
* Note, this mixin must be applied on top of any element class that
|
||||
* itself implements a `connectedCallback` so that it can control the work
|
||||
* done in `connectedCallback`. For example,
|
||||
*
|
||||
* MyClass = Polymer.DisableUpgradeMixin(class extends BaseClass {...});
|
||||
*/
|
||||
function DisableUpgradeMixin<T extends new (...args: any[]) => {}>(base: T): T & DisableUpgradeMixinConstructor;
|
||||
|
||||
interface DisableUpgradeMixinConstructor {
|
||||
new(...args: any[]): DisableUpgradeMixin;
|
||||
}
|
||||
|
||||
interface DisableUpgradeMixin {
|
||||
attributeChangedCallback(name: any, old: any, value: any): any;
|
||||
|
||||
/**
|
||||
* NOTE: cannot gate on attribute because this is called before
|
||||
* attributes are delivered. Therefore, we stub this out and
|
||||
* call `super._initializeProperties()` manually.
|
||||
*/
|
||||
_initializeProperties(): any;
|
||||
|
||||
/**
|
||||
* prevent user code in connected from running
|
||||
*/
|
||||
connectedCallback(): any;
|
||||
|
||||
/**
|
||||
* prevent element from turning on properties
|
||||
*/
|
||||
_enableProperties(): any;
|
||||
|
||||
/**
|
||||
* only go if "enabled"
|
||||
*/
|
||||
disconnectedCallback(): any;
|
||||
}
|
||||
}
|
||||
2
types/lib/mixins/element-mixin.d.ts
vendored
2
types/lib/mixins/element-mixin.d.ts
vendored
@@ -76,7 +76,7 @@ declare namespace Polymer {
|
||||
* `observedAttributes` implementation will automatically return an array
|
||||
* of dash-cased attributes based on `properties`)
|
||||
*/
|
||||
function ElementMixin<T extends new (...args: any[]) => {}>(base: T): T & ElementMixinConstructor & Polymer.PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor & Polymer.PropertiesMixinConstructor;
|
||||
function ElementMixin<T extends new (...args: any[]) => {}>(base: T): T & ElementMixinConstructor & Polymer.PropertyEffectsConstructor & Polymer.PropertiesMixinConstructor;
|
||||
|
||||
interface ElementMixinConstructor {
|
||||
new(...args: any[]): ElementMixin;
|
||||
|
||||
4
types/lib/mixins/properties-changed.d.ts
vendored
4
types/lib/mixins/properties-changed.d.ts
vendored
@@ -56,7 +56,7 @@ declare namespace Polymer {
|
||||
*
|
||||
* @param name Name of property
|
||||
*/
|
||||
typeForProperty(name: string): void;
|
||||
typeForProperty(name: string): any;
|
||||
}
|
||||
|
||||
interface PropertiesChanged {
|
||||
@@ -84,7 +84,7 @@ declare namespace Polymer {
|
||||
*
|
||||
* @param property Name of the property
|
||||
*/
|
||||
_addPropertyToAttributeMap(property: string): void;
|
||||
_addPropertyToAttributeMap(property: string): any;
|
||||
|
||||
/**
|
||||
* Defines a property accessor for the given property.
|
||||
|
||||
2
types/lib/mixins/properties-mixin.d.ts
vendored
2
types/lib/mixins/properties-mixin.d.ts
vendored
@@ -53,7 +53,7 @@ declare namespace Polymer {
|
||||
* accessors exist on the element prototype. This method is called by
|
||||
* `finalize` and finalizes the class constructor.
|
||||
*/
|
||||
_finalizeClass(): void;
|
||||
_finalizeClass(): any;
|
||||
}
|
||||
|
||||
interface PropertiesMixin {
|
||||
|
||||
8
types/lib/mixins/property-accessors.d.ts
vendored
8
types/lib/mixins/property-accessors.d.ts
vendored
@@ -24,14 +24,14 @@ declare namespace Polymer {
|
||||
* For basic usage of this mixin:
|
||||
*
|
||||
* - Declare attributes to observe via the standard `static get observedAttributes()`. Use
|
||||
* `dash-case` attribute names to represent `camelCase` property names.
|
||||
* `dash-case` attribute names to represent `camelCase` property names.
|
||||
* - Implement the `_propertiesChanged` callback on the class.
|
||||
* - Call `MyClass.createPropertiesForAttributes()` **once** on the class to generate
|
||||
* property accessors for each observed attribute. This must be called before the first
|
||||
* - Call `MyClass.createPropertiesForAttributes()` **once** on the class to generate
|
||||
* property accessors for each observed attribute. This must be called before the first
|
||||
* instance is created, for example, by calling it before calling `customElements.define`.
|
||||
* It can also be called lazily from the element's `constructor`, as long as it's guarded so
|
||||
* that the call is only made once, when the first instance is created.
|
||||
* - Call `this._enableProperties()` in the element's `connectedCallback` to enable
|
||||
* - Call `this._enableProperties()` in the element's `connectedCallback` to enable
|
||||
* the accessors.
|
||||
*
|
||||
* Any `observedAttributes` will automatically be
|
||||
|
||||
2
types/lib/mixins/property-effects.d.ts
vendored
2
types/lib/mixins/property-effects.d.ts
vendored
@@ -46,7 +46,7 @@ declare namespace Polymer {
|
||||
* whereas the default when using `PropertyAccessors` standalone is to be
|
||||
* async by default.
|
||||
*/
|
||||
function PropertyEffects<T extends new (...args: any[]) => {}>(base: T): T & PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor;
|
||||
function PropertyEffects<T extends new (...args: any[]) => {}>(base: T): T & PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor;
|
||||
|
||||
interface PropertyEffectsConstructor {
|
||||
new(...args: any[]): PropertyEffects;
|
||||
|
||||
13
types/util/minimalDocument.d.ts
vendored
Normal file
13
types/util/minimalDocument.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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):
|
||||
* util/minimalDocument.js
|
||||
*/
|
||||
|
||||
declare class MinimalDocTransform {
|
||||
_transform(file: any, enc: any, cb: any): any;
|
||||
}
|
||||
Reference in New Issue
Block a user