Skip to content

Commit

Permalink
Fix issues with action() not being a getter on ITraceSession (#556)
Browse files Browse the repository at this point in the history
## Summary:
For some reason the 'get' modifier on the 'action()' getter in ITRaceSession was dropped when the files were converted to TypeScript.  I checked the other getters we have, which are on classes, but they weren't affected.  I suspect it's an issue with the codemod.  I'll investigate later and will patch is possible.

Issue: None

## Test plan:
- yarn typecheck

Author: kevinbarabash

Reviewers: jaredly, somewhatabstract

Required Reviewers:

Approved By: jaredly

Checks: ✅ Test (macos-latest, 16.x), ✅ CodeQL, ✅ Lint, typecheck, and coverage check (ubuntu-latest, 16.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ gerald, ✅ Analyze (javascript), ⏭  dependabot

Pull Request URL: #556
  • Loading branch information
kevinbarabash authored Mar 2, 2023
1 parent b6d850b commit 769f3d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-candles-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/wonder-stuff-server-google": patch
---

Fix ITraceSession interface
1 change: 0 additions & 1 deletion packages/wonder-stuff-server-google/src/trace-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const traceImpl = (
};

return {
// @ts-expect-error [FEI-5011] - TS2322 - Type 'string' is not assignable to type '() => string'.
get action() {
return action;
},
Expand Down
2 changes: 1 addition & 1 deletion packages/wonder-stuff-server-google/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export interface ITraceSession {
/**
* The name of the action being traced as provided when it was started.
*/
action(): string;
get action(): string;
/**
* Add a label to the trace session.
*
Expand Down

0 comments on commit 769f3d5

Please sign in to comment.