Skip to content

Commit

Permalink
docs: path segment
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jan 3, 2023
1 parent d93db33 commit f6581c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/tree.ts
Expand Up @@ -39,7 +39,8 @@ export class TreeNode {
/**
* Adds a path to the tree. `path` cannot start with a `/`.
*
* @param path - route path segment to insert
* @param path - path segment to insert. **It must contain the file extension** this allows to
* differentiate between folders and files.
* @param filePath - file path, defaults to path for convenience and testing
*/
insert(path: string, filePath: string = path): TreeNode {
Expand Down Expand Up @@ -76,7 +77,7 @@ export class TreeNode {
/**
* Remove a route from the tree.
*
* @param path - file path of the file
* @param path - path segment of the file
*/
remove(path: string) {
const { tail, segment, viewName, isComponent } = splitFilePath(
Expand Down

0 comments on commit f6581c5

Please sign in to comment.