import Graph from './Graph'; import Parser from './Parser'; // A TypeScript wrapper class for the autogenerated Parser code. // This prevents a confusing error involving peg$SyntaxError when // the Parser gets attached to the global SmilesDrawer namespace: // > Public static property 'Parser' of exported class has or // > is using name 'peg$SyntaxError' from external module // > "/mnt/src/Parser" but cannot be named. export default class ParserWrapper { static SyntaxError: Error = Parser.SyntaxError as unknown as Error; static parse(smiles: string): Graph { return Parser.parse(smiles); } }