Skip to content

Commit 86a4e1d

Browse files
committed
Fix typos
1 parent 3e2e953 commit 86a4e1d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/functions/getGenerator.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import getObject from './getObject';
22

3-
const getGenerator = (result: UnkwnownObject): UnkwnownObject[] => {
4-
return getObject(result.html as UnkwnownObject, 'name', 'meta')
5-
.filter((meta: UnkwnownObject) => {
3+
const getGenerator = (result: UnknownObject): UnknownObject[] => {
4+
return getObject(result.html as UnknownObject, 'name', 'meta')
5+
.filter((meta: UnknownObject) => {
66
return Object.prototype.hasOwnProperty.call(meta, 'attribs') &&
77
Object.prototype.hasOwnProperty.call(meta.attribs, 'name') &&
88
Object.prototype.hasOwnProperty.call(meta.attribs, 'content');
99
})
10-
.filter((meta: UnkwnownObject) => {
10+
.filter((meta: UnknownObject) => {
1111

1212
if ('attribs' in meta === false || typeof meta.attribs !== 'object' || 'name' in meta.attribs === false || typeof meta.attribs.name !== 'string') {
1313
return false;

src/functions/getObject.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const getObject = (theObject: UnkwnownObject, key: string, value: string): UnkwnownObject[] => {
1+
const getObject = (theObject: UnknownObject, key: string, value: string): UnknownObject[] => {
22
let result = [];
33
if (theObject instanceof Array) {
44
for (const obj of theObject) {
@@ -14,7 +14,7 @@ const getObject = (theObject: UnkwnownObject, key: string, value: string): Unkwn
1414
}
1515
}
1616
if (prop === 'children') {
17-
result = result.concat(getObject(theObject[prop] as UnkwnownObject, key, value));
17+
result = result.concat(getObject(theObject[prop] as UnknownObject, key, value));
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)