Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strict": false,
"noImplicitAny": true,
"allowJs": true,
"target": "es2020",
Expand All @@ -13,7 +14,7 @@
],
"esModuleInterop": true,
"sourceMap": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
Expand Down
4 changes: 2 additions & 2 deletions src/binding/BindingBase/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class BindingBase extends Events {
*/
set historyEnabled(value) {
if (this._history) {
// @ts-ignore
// @ts-expect-error
this._history.enabled = value;
}
}
Expand All @@ -273,7 +273,7 @@ class BindingBase extends Events {
* Gets whether history is enabled for the binding.
*/
get historyEnabled() {
// @ts-ignore
// @ts-expect-error
return this._history && this._history.enabled;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ArrayInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class ArrayInput extends Element implements IFocusable, IBindable {

this._getDefaultFn = args.getDefaultFn ?? null;

// @ts-ignore
// @ts-expect-error
let valueType = args.elementArgs && args.elementArgs.type || args.type;
if (!ArrayInput.DEFAULTS.hasOwnProperty(valueType)) {
valueType = 'string';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Button extends Element<ButtonArgs, any> {
static ctor = ButtonClass;

render() {
// @ts-ignore
// @ts-expect-error
return <button ref={this.attachElement} />;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Canvas/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Canvas extends Element<CanvasArgs, any> {
static ctor = CanvasClass;

render() {
// @ts-ignore
// @ts-expect-error
return <canvas ref={this.attachElement}/>;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ColorPicker/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ColorPicker extends Element<ColorPickerArgs, any> {
static ctor = ColorPickerClass;

render() {
// @ts-ignore
// @ts-expect-error
return <div ref={this.attachElement}/>;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ColorPicker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ class ColorPicker extends Element implements IBindable {
const value = values[0];
for (let i = 1; i < values.length; i++) {
if (Array.isArray(value)) {
// @ts-ignore
// @ts-expect-error
const other: number[] = values[i];
if (!Array.isArray(other) || value.length !== other.length ||
value.some((v, j) => v !== other[j])) {
Expand All @@ -787,7 +787,7 @@ class ColorPicker extends Element implements IBindable {
this.value = null;
this.class.add(CLASS_MULTIPLE_VALUES);
} else {
// @ts-ignore
// @ts-expect-error
this.value = values[0];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Container/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Container extends Element<ContainerArgs, any> {
);
}

// @ts-ignore
// @ts-expect-error
return <div ref={this.attachElement}>
{ elements }
</div>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Container/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ class Container extends Element {
});
} else {
rootNode = node[keys[0]];
// @ts-ignore
// @ts-expect-error
this[`_${keys[0]}`] = rootNode;
}
return rootNode;
Expand Down
10 changes: 5 additions & 5 deletions src/components/Element/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ class Element<P extends ElementArgs, S> extends React.Component<P, S> {
const propDescriptor = this.getPropertyDescriptor(this.element, prop);
if (propDescriptor && propDescriptor.set) {
if (prop === 'value') {
// @ts-ignore
// @ts-expect-error
this.element._suppressChange = true;
// @ts-ignore
// @ts-expect-error
this.element[prop] = this.props[prop];
// @ts-ignore
// @ts-expect-error
this.element._suppressChange = false;
} else {
// @ts-ignore
// @ts-expect-error
this.element[prop] = this.props[prop];
}
} else if (prop === 'class') {
Expand All @@ -124,7 +124,7 @@ class Element<P extends ElementArgs, S> extends React.Component<P, S> {
}

render() {
// @ts-ignore
// @ts-expect-error
return <div ref={this.attachElement} />;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Element/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@ class Element extends Events {

// copy CSS properties from args
for (const key in args) {
// @ts-ignore
// @ts-expect-error
if (args[key] === undefined) continue;
if (SIMPLE_CSS_PROPERTIES.indexOf(key) !== -1) {
// @ts-ignore
// @ts-expect-error
this[key] = args[key];
}
}
Expand Down Expand Up @@ -587,9 +587,9 @@ class Element extends Events {
// because we do not want to be emitting events
// on a destroyed parent after it's been destroyed
// as it is easy to lead to null exceptions
// @ts-ignore
// @ts-expect-error
if (parent.remove && !parent._destroyed) {
// @ts-ignore
// @ts-expect-error
parent.remove(this);
}

Expand Down Expand Up @@ -1047,7 +1047,7 @@ class Element extends Events {
this._binding = value;

if (this._binding) {
// @ts-ignore
// @ts-expect-error
this._binding.element = this;
if (prevObservers && prevPaths) {
this.link(prevObservers, prevPaths);
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradientPicker/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GradientPicker extends Element<GradientPickerArgs, any> {
static ctor = GradientPickerClass;

render() {
// @ts-ignore
// @ts-expect-error
return <div ref={this.attachElement}/>;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/GradientPicker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class GradientPicker extends Element {
this._channels = args.channels ?? 3;
this._value = this._getDefaultValue();
if (args.value) {
// @ts-ignore
// @ts-expect-error
this.value = args.value;
}
}
Expand Down Expand Up @@ -1396,7 +1396,7 @@ class GradientPicker extends Element {
if (value[0].type !== CURVE_STEP &&
value[0].type !== CURVE_LINEAR &&
value[0].type !== CURVE_SPLINE) {
// @ts-ignore
// @ts-expect-error
comboItems[3] = 'Legacy';
this.STATE.typeMap[3] = value[0].type;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/GridViewItem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GridViewItem extends Container implements IFocusable {
binding: new BindingObserversToElement()
});

// @ts-ignore Remove radio button click event listener
// @ts-expect-error Remove radio button click event listener
this._radioButton.dom.removeEventListener('click', this._radioButton._onClick);
this._radioButton.dom.addEventListener('click', this._onRadioButtonClick);

Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoBox/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class InfoBox extends Element<InfoBoxArgs, any> {
static ctor = InfoBoxClass;

render() {
// @ts-ignore
// @ts-expect-error
return <span ref={this.attachElement} />;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Label/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Label extends Element<LabelArgs, any> {
static ctor = LabelClass;

render() {
// @ts-ignore
// @ts-expect-error
return <span ref={this.attachElement} />;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Menu extends Container implements IFocusable {
item.hidden = !item.onIsVisible();
}

// @ts-ignore
// @ts-expect-error
for (const child of item._containerItems.dom.childNodes) {
this._filterMenuItems(child.ui as MenuItem);
}
Expand All @@ -141,7 +141,7 @@ class Menu extends Container implements IFocusable {
protected _limitSubmenuAtScreenEdges(item: MenuItem) {
if (!(item instanceof MenuItem) || !item.hasChildren) return;

// @ts-ignore
// @ts-expect-error
const containerItems = item._containerItems;

containerItems.style.top = '';
Expand Down
12 changes: 6 additions & 6 deletions src/components/Panel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,18 @@ class Panel extends Container {
window.addEventListener('mousemove', this._onDragMove);

this.emit('dragstart');
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
if (this.parent && this.parent._onChildDragStart) {
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
this.parent._onChildDragStart(evt, this);
}
};

protected _onDragMove = (evt: MouseEvent) => {
this.emit('dragmove');
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
if (this.parent && this.parent._onChildDragStart) {
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
this.parent._onChildDragMove(evt, this);
}
};
Expand All @@ -346,9 +346,9 @@ class Panel extends Container {
}

this.emit('dragend');
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
if (this.parent && this.parent._onChildDragStart) {
// @ts-ignore accessing protected methods
// @ts-expect-error accessing protected methods
this.parent._onChildDragEnd(evt, this);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ class SelectInput extends Element implements IBindable, IFocusable {
label.class.add(CLASS_SELECTED);
}

// @ts-ignore
// @ts-expect-error
container.value = value;

return container;
Expand Down Expand Up @@ -1270,7 +1270,7 @@ class SelectInput extends Element implements IBindable, IFocusable {
// value from the tags that are currently visible
const result: any = [];
this._containerTags.dom.childNodes.forEach((dom) => {
// @ts-ignore
// @ts-expect-error
result.push(dom.ui.value);
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/Spinner/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Spinner extends Element<SpinnerArgs, any> {
static ctor = SpinnerClass;

render() {
// @ts-ignore
// @ts-expect-error
return <svg ref={this.attachElement} />;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TreeView/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ class TreeView extends Container {
if (!dragOverItem || dragOverItem.hidden || !dragOverItem.parentsOpen) {
this._dragHandle.hidden = true;
} else {
// @ts-ignore
// @ts-expect-error
const rect = dragOverItem._containerContents.dom.getBoundingClientRect();

this._dragHandle.hidden = false;
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strict": false,
"noImplicitAny": true,
"allowJs": true,
"target": "es2020",
Expand All @@ -13,7 +14,7 @@
],
"esModuleInterop": true,
"sourceMap": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
Expand Down