Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819import { declarationSymbols } from './shared';import type { LanguageAdapter } from '../types';
const kinds = new Map([ ['function_declaration', 'function'], ['class_declaration', 'class'], ['lexical_declaration', 'variable'], ['variable_declaration', 'variable'], ['export_statement', 'export'],]);const nestedKinds = new Map([['method_definition', 'method']]);const containers = new Set(['class_declaration']);
export const javascriptAdapter: LanguageAdapter = { extensions: ['.js', '.jsx', '.mjs', '.cjs'], grammarName: 'javascript', symbols: (node, source) => declarationSymbols(node, source, kinds, nestedKinds, containers),};