Open
Conversation
…ctor/typescript
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces TypeScript support across the core package and updates the build/lint/test tooling so the repository can compile and typecheck .ts/.tsx alongside existing JavaScript.
Changes:
- Add TypeScript toolchain:
tsconfig.json, TypeScript Babel preset, TypeScript-aware webpack resolution/rules, and atypecheckscript. - Migrate a set of
core/*utilities/modules from.jsto.ts, adding typings and tightening some APIs. - Extend ESLint + lint-staged + test webpack config to include
.ts/.tsxsources.
Reviewed changes
Copilot reviewed 67 out of 77 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds TypeScript, Babel TS preset, TS ESLint tooling, and type packages to the lockfile. |
| webpack.config.server.babel.js | Adds .ts/.tsx resolution and transpilation for server bundle. |
| webpack.config.babel.js | Adds .ts/.tsx resolution and transpilation for client bundle. |
| tsconfig.json | Introduces TS compiler settings (typecheck-only). |
| test/webpack.config.js | Extends test bundling to include .ts/.tsx tests and resolve extensions. |
| package.json | Adds typecheck script and TS-related dev dependencies; extends lint-staged globs. |
| global.d.ts | Declares module types for styles/images and a global constant. |
| eslint.config.js | Adds TypeScript parsing + rules, and extends existing configs to include .ts/.tsx. |
| core/uuid.ts | Adds TS version of uuid helpers. |
| core/uuid.js | Switches uuid helper to CommonJS export style. |
| core/user2FADevice/user2FADevice.ts | Migrates User2FADevice helpers to TypeScript. |
| core/user2FADevice/user2FADevice.js | Removes JS implementation (migrated to TS). |
| core/user2FADevice/index.ts | Adds TS barrel export for user2FADevice. |
| core/uniqueNameGenerator.ts | Adds TS annotations and refactors variable initialization. |
| core/systemError.ts | Adds TS typing for SystemError and makes StatusCodes as const. |
| core/stringUtils.ts | Migrates string utilities to TypeScript and adds typings. |
| core/stringUtils.js | Removes JS implementation (migrated to TS). |
| core/queue.ts | Migrates Queue to a typed generic implementation. |
| core/promiseUtils.ts | Migrates promise utilities to TypeScript. |
| core/promiseUtils.js | Removes JS implementation (migrated to TS). |
| core/processUtils.ts | Adds TS version of process/env utilities alongside existing JS version. |
| core/objectUtils.ts | Migrates object utilities to TypeScript. |
| core/objectUtils.js | Removes JS implementation (migrated to TS). |
| core/numberUtils.ts | Adds TS typing to numeric helpers. |
| core/numberConversionUtils.ts | Migrates number conversion helpers to TypeScript. |
| core/numberConversionUtils.js | Removes JS implementation (migrated to TS). |
| core/message/messageValidator.ts | Adds TS typing to message validation entrypoint. |
| core/markdownValidator.ts | Adds TS typing and explicit stack typing for marked token traversal. |
| core/markdownUtils.ts | Migrates markdown parsing/sanitization helper to TypeScript. |
| core/markdownUtils.js | Removes JS implementation (migrated to TS). |
| core/map/mapUtils.ts | Migrates map tile URL utilities to TypeScript. |
| core/map/mapUtils.js | Removes JS implementation (migrated to TS). |
| core/i18n/i18nFactory.ts | Adds TypeScript annotations and interop casts for i18next factory. |
| core/functionsDefer.ts | Migrates debounce/throttle utilities to TypeScript with typed timeout maps. |
| core/fileFormats.ts | Adds as const and typed accessor for extensions by file format. |
| core/dateUtils.ts | Migrates date utilities to TypeScript with typed i18n parameter for relative dates. |
| core/dateUtils.js | Removes JS implementation (migrated to TS). |
| core/dataImport/index.ts | Adds TS barrel export for data import types. |
| core/dataImport/dataImportTemplateTypes.ts | Adds as const typing to template type constants. |
| core/counter.ts | Migrates Counter to TypeScript. |
| core/counter.js | Removes JS implementation (migrated to TS). |
| core/auth/jwtConstants.ts | Adds TS constant for bearer prefix. |
| core/auth/authorizer.ts | Migrates authorizer logic to TypeScript with arena-core types. |
| core/auth/authorizer.js | Removes JS implementation (migrated to TS). |
| core/auth/authGroup.ts | Improves typing around auth groups and permissions mapping. |
| core/arrayUtils.ts | Migrates array utility module to TypeScript. |
| core/arrayUtils.js | Removes JS implementation (migrated to TS). |
| core/arena/stringify.ts | Adds typings and preserves stringify behavior with explicit null handling. |
| core/arena/set.ts | Adds typings to mutating set helper. |
| core/arena/propOr.ts | Adds typings and null-safe object handling. |
| core/arena/prop.ts | Adds typings for property access helper. |
| core/arena/pipe.ts | Migrates pipe helper to TypeScript. |
| core/arena/pipe.js | Removes JS implementation (migrated to TS). |
| core/arena/parse.ts | Adds typings and safer casts for Map/Set reviver behavior. |
| core/arena/omit.ts | Adds typings for omit helper and accumulator typing. |
| core/arena/isNull.ts | Adds typings for null/undefined check helper. |
| core/arena/isEmpty.ts | Adds typings and safe casts for collection emptiness checks. |
| core/arena/internal/_isPlaceholder.ts | Migrates placeholder detection to TypeScript. |
| core/arena/internal/_isPlaceholder.js | Removes JS implementation (migrated to TS). |
| core/arena/internal/_curry3.ts | Migrates internal curry helper to TypeScript. |
| core/arena/internal/_curry3.js | Removes JS implementation (migrated to TS). |
| core/arena/internal/_curry2.ts | Migrates internal curry helper to TypeScript. |
| core/arena/internal/_curry1.ts | Migrates internal curry helper to TypeScript. |
| core/arena/internal/_camelizePartial.ts | Migrates internal camelize logic to TypeScript with typed options. |
| core/arena/index.ts | Adds TS barrel exports for arena helper functions. |
| core/arena/identity.ts | Adds a generic-typed identity function. |
| core/arena/dissoc.ts | Adds typings for dissoc helper. |
| core/arena/camelizePartial.ts | Adds TS wrapper export for camelizePartial. |
| core/arena/camelize.ts | Adds typings for camelize helper. |
| core/arena/assoc.ts | Adds typings for assoc helper. |
| core/app/languages.ts | Adds typings for language label lookup and language lists. |
| core/app/appInfo.ts | Adds typings for app info helpers. |
| core/Countries/index.ts | Adds TS barrel export for Countries module. |
| core/Countries/Countries.ts | Migrates Countries module to TypeScript with typed JSON shape. |
| core/Countries/Countries.js | Removes JS implementation (migrated to TS). |
| babel.config.js | Adds @babel/preset-typescript and uses @babel/preset-react explicitly. |
Comments suppressed due to low confidence (1)
core/uniqueNameGenerator.ts:25
parseName(startingName)is invoked twice (once to getcount, once to getnameWithoutCount). This is minor but unnecessary work and makes the flow harder to follow; consider destructuring both from a single call.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




No description provided.