Add mock mixin for Polymer.IronFitBehavior
Polymer.IronFitBehavior doesn't have a mixin and should be added to component using Polymer.mixinBehavior([Polymer.IronFitBehavior]). Polymer linter doesn't process this correctly. To workaround it the mock mixin was added. It will be used in JSDoc comments after conversion to class-based elements. Change-Id: I61be019129879efe50c11c0f7dd56d6cef679136
This commit is contained in:
52
polygerrit-ui/app/types/polymer-behaviors.js
Normal file
52
polygerrit-ui/app/types/polymer-behaviors.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* For the purposes of template type checking, externs should be added for
|
||||
* anything set on the window object. Note that sub-properties of these
|
||||
* declared properties are considered something separate.
|
||||
*
|
||||
* This file is only for template type checking, not used in Gerrit code.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable no-unused-vars */
|
||||
|
||||
function PolymerMixins() {
|
||||
// This function must not be called.
|
||||
// Due to an issue in polymer linter the linter can't
|
||||
// process correctly some behaviors from Polymer library.
|
||||
// To workaround this issue, here we define a minimal mixin to allow
|
||||
// linter process our code correctly. You can add more properties to mixins
|
||||
// if needed.
|
||||
|
||||
// Important! Use mixins from these file only inside JSDoc comments.
|
||||
// Do not use it in the real code
|
||||
|
||||
/**
|
||||
* @polymer
|
||||
* @mixinFunction
|
||||
* */
|
||||
Polymer.IronFitMixin = base =>
|
||||
class extends base {
|
||||
static get properties() {
|
||||
return {
|
||||
positionTarget: Object,
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user