Skip to content

Commit

Permalink
fix(typing): positional argument should extends Array<any>
Browse files Browse the repository at this point in the history
  • Loading branch information
vscav committed Jan 15, 2024
1 parent 9a6a191 commit 47b8b9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ember-autofocus-modifier/src/modifiers/autofocus.ts
Expand Up @@ -16,7 +16,7 @@ const DEFAULT_SELECTOR =
interface ModifierArgs {
Element: HTMLElement;
Args: {
Positional: [string?] | undefined; // Optional selector
Positional: [string?]; // Optional selector
Named: {
disabled?: boolean; // Optional 'disabled' parameter
};
Expand Down
4 changes: 2 additions & 2 deletions test-app/tests/integration/modifiers/autofocus-test.ts
Expand Up @@ -181,7 +181,7 @@ module('Integration | Modifier | autofocus', function (hooks) {

test('should not focus due to disabled parameter set to true without providing a selector', async function (assert) {
await render(hbs`
<div {{autofocus disabled=true}}>
<div {{autofocus "input" disabled=true}}>
<span>this is not a focusable element</span>
<button type="button" data-test-button>this is a button</button>
<input id="1" data-test-input-1 />
Expand All @@ -206,7 +206,7 @@ module('Integration | Modifier | autofocus', function (hooks) {

test('should focus due to disabled parameter set to false', async function (assert) {
await render(hbs`
<div {{autofocus disabled=false}}>
<div {{autofocus "input" disabled=false}}>
<span>this is not a focusable element</span>
<button type="button" data-test-button>this is a button</button>
<input id="1" data-test-input-1 />
Expand Down

0 comments on commit 47b8b9b

Please sign in to comment.