Skip to content

Migrating scope stages into handlers #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Oct 23, 2022

Fixes #1054

Checklist

@AndreasArvidsson AndreasArvidsson changed the title Started migrating scope stages into handlers Migrating scope stages into handlers Oct 23, 2022
@@ -12,7 +12,7 @@ export default class LineScopeHandler implements ScopeHandler {
public readonly iterationScopeType = { type: "document" } as const;

constructor(
public readonly scopeType: { type: "line" },
public readonly scopeType: ScopeType,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking of using this type information for generating our docs. Do you mind if we leave it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not turn it into a proper type instead? I mean in the types file we have made them all SimpleScopeType if we actually want to have it more fine grain I think we should do it at that end so we don't have to do casts when calling the constructor.
public readonly scopeType: LineScopeType

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would giving it a name allow us to avoid casts?

@pokey
Copy link
Member

pokey commented Oct 23, 2022

Folded into #1075

@pokey pokey closed this Oct 23, 2022
@pokey pokey deleted the scope_handlers branch February 16, 2023 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate document to use a scope handler
2 participants