Skip to content

Commit

Permalink
Expression method typings
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed Aug 8, 2023
1 parent c241d81 commit 7687caf
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 142 deletions.
6 changes: 3 additions & 3 deletions src/templates/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class Context {
return context;
}

forRelative(expression) {
forRelative(expression: Expression) {
let context: Context = this;
while (context && context.expression === expression || context.view) {
context = context.parent;
Expand All @@ -167,7 +167,7 @@ export class Context {
}

// Returns the closest context which defined the named alias
forAlias(alias) {
forAlias(alias: string) {
let context: Context = this;
while (context) {
if (context.alias === alias || context.keyAlias === alias) return context;
Expand All @@ -176,7 +176,7 @@ export class Context {
}

// Returns the closest containing context for a view attribute name or nothing
forAttribute(attribute) {
forAttribute(attribute: string) {
let context: Context = this;
while (context) {
// Find the closest context associated with a view
Expand Down
Loading

0 comments on commit 7687caf

Please sign in to comment.