feat: Replace this.$refs.refName as Vue with InstanceType<T> (no-changelog) (#6050)

* refactor: use InstanceType<T> for all this.$refs types

* refactor: update refs type in N8nSelect

* fix: remove inputRef non-null assertion

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>

* fix: remove non-null assertion

---------

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
This commit is contained in:
Alex Grozav
2023-04-21 16:59:04 +03:00
committed by GitHub
parent 19f540ecf9
commit 54f99a7d0d
41 changed files with 427 additions and 318 deletions

View File

@@ -375,6 +375,8 @@ import { useNodeTypesStore } from '@/stores/nodeTypes';
import { useCredentialsStore } from '@/stores/credentials';
import { htmlEditorEventBus } from '@/event-bus';
type ResourceLocatorRef = InstanceType<typeof ResourceLocator>;
export default mixins(
externalHooks,
nodeHelpers,
@@ -1099,10 +1101,9 @@ export default mixins(
}
} else if (command === 'refreshOptions') {
if (this.isResourceLocatorParameter) {
const resourceLocator = this.$refs.resourceLocator;
if (resourceLocator) {
(resourceLocator as Vue).$emit('refreshList');
}
const resourceLocatorRef = this.$refs.resourceLocator as ResourceLocatorRef | undefined;
resourceLocatorRef?.$emit('refreshList');
}
this.loadRemoteParameterOptions();
} else if (command === 'formatHtml') {