Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[Mode.Angular](config?: ProjectLayout) {
if (!config || !config.tsconfigPath) {
throw new Error('Path to tsconfig.json not provided');
}
return parseAngularRoutes(config.tsconfigPath);
},
[Mode.ReactTSX](config?: ProjectLayout) {
[Mode.PreactJSX](config?: ProjectLayout) {
if (!config || !config.sourceDir) {
throw new Error('Source directory not provided');
}
return parsePreactJSXRoutes(config.sourceDir);
},
[Mode.Gatsby](): RoutingModule[] {
[Mode.ReactJSX](config?: ProjectLayout) {
if (!config || !config.sourceDir) {
throw new Error('Source directory not provided');
}
return parseReactJSXRoutes(config.sourceDir);
},
[Mode.PreactJSX](config?: ProjectLayout) {
[Mode.ReactTSX](config?: ProjectLayout) {
if (!config || !config.tsconfigPath) {
throw new Error('Path to tsconfig.json not provided');
}
return parseReactTSXRoutes(config.tsconfigPath);
},
[Mode.ReactJSX](config?: ProjectLayout) {