File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import "tippy.js/themes/material.css";
77import styles from "./styles.module.css" ;
88import definitions from "./definitions" ;
99import 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 =
Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments