Fix funny typo
parent
78d6adbaff
commit
d5593cb80a
|
@ -5,15 +5,15 @@ const assert = require('assert');
|
|||
const {partition, log} = require('./utils');
|
||||
|
||||
function extract(node) {
|
||||
if (!handlers[node.type]) {
|
||||
if (!extractors[node.type]) {
|
||||
log(node);
|
||||
return null;
|
||||
}
|
||||
|
||||
return handlers[node.type](node);
|
||||
return extractors[node.type](node);
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
const extractors = {
|
||||
TypeAlias(node) {
|
||||
return extract(node.right);
|
||||
},
|
||||
|
@ -28,7 +28,7 @@ const handlers = {
|
|||
|
||||
ClassBody(node) {
|
||||
return {
|
||||
type: 'report',
|
||||
type: 'record',
|
||||
fields: node.body.map(extract).filter(Boolean),
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue