Skip to content

Commit

Permalink
Update hugo/content/docs/recipes/scoping/file-based.md
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Sujew <[email protected]>
  • Loading branch information
Lotes and msujew committed Aug 6, 2024
1 parent d6c1685 commit b0e4a71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hugo/content/docs/recipes/scoping/file-based.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ The index manager shall get all persons that are marked with the export keyword.

```typescript
export class HelloWorldScopeComputation extends DefaultScopeComputation {
override async computeExports(document: LangiumDocument<AstNode>, _cancelToken?: CancellationToken | undefined): Promise<AstNodeDescription[]> {
override async computeExports(document: LangiumDocument<AstNode>): Promise<AstNodeDescription[]> {
const model = document.parseResult.value as Model;
return model.persons
.filter(p => p.published)
.map(p => this.descriptions.createDescription(p, p.name))
;
.map(p => this.descriptions.createDescription(p, p.name));
}
}
```
Expand Down

0 comments on commit b0e4a71

Please sign in to comment.