Skip to content

chore: prepare for TypeScript strict mode - #1165

Merged
ggrossetie merged 1 commit into
asciidoctor:mainfrom
ggrossetie:chore/typescript-strict-step1
Jul 14, 2026
Merged

chore: prepare for TypeScript strict mode#1165
ggrossetie merged 1 commit into
asciidoctor:mainfrom
ggrossetie:chore/typescript-strict-step1

Conversation

@ggrossetie

Copy link
Copy Markdown
Member

Enable every strict-family flag that already passes cleanly (noImplicitThis, strictFunctionTypes, strictBindCallApply, alwaysStrict, useUnknownInCatchVariables), declare the Node types explicitly via "types" (the browser profile keeps excluding them), and add a "typecheck" script so these flags are enforced outside build-test.

The noImplicitThis fixes type the this parameter of the Asciidoctor extension callbacks that stash state on the processor instance, using dedicated state interfaces instead of as any casts.

Enable every strict-family flag that already passes cleanly
(noImplicitThis, strictFunctionTypes, strictBindCallApply, alwaysStrict,
useUnknownInCatchVariables), declare the Node types explicitly via
"types" (the browser profile keeps excluding them), and add a
"typecheck" script so these flags are enforced outside build-test.

The noImplicitThis fixes type the `this` parameter of the Asciidoctor
extension callbacks that stash state on the processor instance, using
dedicated state interfaces instead of `as any` casts.

Remaining before "strict": true: noImplicitAny (106 errors), then
strictNullChecks (86) and strictPropertyInitialization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ggrossetie
ggrossetie merged commit 7fb4bfb into asciidoctor:main Jul 14, 2026
2 checks passed
@ggrossetie
ggrossetie deleted the chore/typescript-strict-step1 branch July 14, 2026 12:31
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.

1 participant