Skip to content

Commit 2162cb8

Browse files
committed
autoType -> typeMap
1 parent 16ba9c5 commit 2162cb8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/Term/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "tippy.js/themes/material.css";
77
import styles from "./styles.module.css";
88
import definitions from "./definitions";
99
import shortDefinitions from "./short-definitions.js";
10-
import autoType from "./auto-type.js";
10+
import typeMap from "./type-map.js";
1111

1212
/**
1313
* @param {Object} props
@@ -19,10 +19,10 @@ export default function Term({ type = null, children }) {
1919
if (typeof node === "string") return node;
2020
else return unwrapNode(node.props.children);
2121
}
22-
if (type === null) type = autoType.get(unwrapNode(children));
22+
if (type === null) type = typeMap.get(unwrapNode(children));
2323
if (!type)
2424
throw new Error(
25-
`Problem: Term ${children.textContent} is not defined in AutoType.
25+
`Problem: Term ${children.textContent} is not defined in type-map.js .
2626
Solution: explicitly specify term type, or add type definition to auto-type.js`,
2727
);
2828
const term =
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
> data is stored as Map. use Map#get
1212
*/
1313

14-
const autoType = new Map([
14+
const typeMap = new Map([
1515
["拡張子", "fileExtension"],
1616
["フォーク", "fork"],
1717
["Git", "git"],
@@ -82,4 +82,4 @@ const autoType = new Map([
8282
["JSX", "jsx"],
8383
]);
8484

85-
export default autoType;
85+
export default typeMap;

0 commit comments

Comments
 (0)