Skip to content

Commit 03106f6

Browse files
Merge pull request #145 from eatsjobs/main
Fix: explicit typescript type for asElement function
2 parents 339052e + 7ddb797 commit 03106f6

4 files changed

Lines changed: 136 additions & 43 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ jobs:
1515
node-version: [20]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v2
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323
cache: 'npm'
24+
cache-dependency-path: '**/package-lock.json'
2425
- run: npm ci
2526
- run: npm run build --if-present
2627
- run: npm run coverage --if-present

esm/dom/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import { childNodes, nodeType, parentNode } from './symbols.js';
44

55
import { empty } from '../utils.js';
66

7+
8+
/**
9+
* @param {import("./element.js").default} element
10+
* @returns {boolean}
11+
*/
712
export const asElement = ({ [nodeType]: type }) => type === ELEMENT_NODE;
813

914
export const changeParentNode = (node, parent) => {

package-lock.json

Lines changed: 111 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)