chore: add TypeScript `Strict Mode` Support for the packages
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- build-system, ci-cd, developer-experience, tooling
Research direction
Start with the package-level tsconfig.json for @asgardeo/javascript, then follow the listed package order and inspect the affected *.ts and *.tsx files. Enable strict mode, resolve the resulting type issues, update CI and contributing documentation, and verify that all packages pass strict checking.
Written by the indexing model from the issue text.
Description
Current Limitation
Currently, TypeScript strict mode is not consistently enabled across all packages in the monorepo. This leads to:
- Potential runtime errors that could be caught at compile time
- Implicit
anytypes that reduce type safety - Missing null/undefined checks that could cause runtime issues
- Inconsistent type checking standards across different packages
- Reduced developer experience due to less precise type inference
Without strict mode enabled, the codebase may contain:
- Functions with implicit return type
any - Variables that could be
nullorundefinedwithout proper checks - Less strict function parameter checking
- Weaker type checking for object property access
Suggested Improvement
Enable TypeScript strict mode across all packages and fix related type issues:
Implementation Plan
[!NOTE]
Start with the following order:
- @asgardeo/javascript
- @asgardeo/browser
- @asgardeo/react
- @asgardeo/node
- @asgardeo/nextjs
-
Enable strict mode in tsconfig.json files
- Add
"strict": trueto all package-leveltsconfig.jsonfiles - Ensure consistent strict mode configuration across the monorepo
- Add
-
Fix type errors systematically
- Address implicit
anytypes by adding proper type annotations - Add null/undefined checks where needed using optional chaining and nullish coalescing
- Fix function return type annotations
- Resolve strict property initialization issues
- Address implicit
-
Update build process
- Ensure CI/CD pipeline fails on strict mode violations
- Update lint rules to complement strict mode checks
-
Documentation updates
- Update contributing guidelines to mention strict mode requirements
- Add examples of proper typing patterns
Files to be updated
packages/*/tsconfig.json- Enable strict mode- Various
*.tsand*.tsxfiles - Fix type issues - CI configuration - Ensure strict checking in build pipeline]
Please select the package issue is related to
@asgardeo/express, @asgardeo/browser, @asgardeo/javascript, @asgardeo/nextjs, @asgardeo/node, @asgardeo/nuxt, @asgardeo/react, @asgardeo/react-router, @asgardeo/vue
Version
current
Reporter Checklist
- I have searched the existing issues and this is not a duplicate.
- I have provided all the necessary information.
- I have verified the improvement is not available in the latest version of the package.
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 67
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from asgardeo/javascript
-
Bug: SignInButton render prop usage in "react-tanstack-router" sample missing "onClick={signIn}" OpenType/Bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
asgardeo/javascript#572 ·
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
asgardeo/javascript#571 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
asgardeo/javascript#485 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
asgardeo/javascript#527 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
asgardeo/javascript#522 · 2 comments ·
All issues in asgardeo/javascript
Similar issues
-
blocklist removal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100