Skip to content

Conversation

@Anurag-Bansode
Copy link

@Anurag-Bansode Anurag-Bansode commented Oct 14, 2025

Why:
for migrating the project from JavaScript to TypeScript.

What:

  • Added tsconfig.json for the main application code and tsconfig.node.json for build-related files like the Vite config.
  • Converted vite.config.js to vite.config.ts to make the build configuration type-safe.
  • Created src/vite-env.d.ts to include Vite-specific client type definitions.
  • Migrated the main entry point from src/main.jsx to src/main.tsx.
  • Installed TypeScript, type definitions (@types/*), and ESLint plugins (@typescript-eslint/*) as dev dependencies.
  • Created a new eslint.config.js to support TypeScript and React linting rules.
  • Added types mentioned in scope as well as in readme

closes (#7)

Why:
for migrating the project from JavaScript to TypeScript.

What:
- Added `tsconfig.json` for the main application code and `tsconfig.node.json` for build-related files like the Vite config.
- Converted `vite.config.js` to `vite.config.ts` to make the build configuration type-safe.
- Created `src/vite-env.d.ts` to include Vite-specific client type definitions.
- Migrated the main entry point from `src/main.jsx` to `src/main.tsx`.
- Installed TypeScript, type definitions (`@types/*`), and ESLint plugins (`@typescript-eslint/*`) as dev dependencies.
- Created a new `eslint.config.js` to support TypeScript and React linting rules.

  Changes to be committed:
	modified:   eslint.config.js
	modified:   package-lock.json
	modified:   package.json
	deleted:    src/main.jsx
	new file:   src/main.tsx
	new file:   src/vite-env.d.ts
	new file:   tsconfig.json
	new file:   tsconfig.node.json
	new file:   vite.config.ts
Why:
migration to TypeScript by converting the main `App` component.
includes clean-up and fixes for the TypeScript and build configurations

What:
- Renamed `App.jsx` to `App.tsx` and updated its import in `main.tsx`.
- Explicitly typed the `App` component with `React.FC` for better clarity and type safety.
- Corrected issues in `tsconfig.json` and `tsconfig.node.json` related to project references and file emission, simplifying the setup.
- Removed the old `vite.config.js` file, as it has been fully replaced by `vite.config.ts`.

 Changes to be committed:
	modified:   package-lock.json
	modified:   package.json
	renamed:    src/App.jsx -> src/App.tsx
	modified:   src/main.tsx
	modified:   tsconfig.json
	modified:   tsconfig.node.json
	deleted:    vite.config.js
	modified:   vite.config.ts
Why:
Improves the organization of files and is easier to debug

What:
- The main `src/types/index.ts` acts as main source
- Created individual type definition files for each synthesizer module (`envelope.ts`, `filter.ts`, `lfo.ts`, `oscillator.ts`, `effects.ts`, `sequencer.ts`).
- Expanded the core `SynthState` interface to include modules mentioned in readme .
- Added new interfaces for `Oscillator` and `SequencerStep`.
- Converted the `path.js` constants file to `path.ts` to ensure type-safe handling of asset paths.

 Changes to be committed:
	new file:   src/types/effects.ts
	new file:   src/types/envelope.ts
	new file:   src/types/eq.ts
	new file:   src/types/filter.ts
	new file:   src/types/index.ts
	new file:   src/types/lfo.ts
	new file:   src/types/oscillator.ts
	new file:   src/types/path.ts
	new file:   src/types/sequencer.ts
	new file:   src/types/waveform.ts
@Anurag-Bansode Anurag-Bansode changed the title build(typescript): initialize TypeScript environment refactor(all): initialize TypeScript environment Oct 14, 2025
@Anurag-Bansode Anurag-Bansode marked this pull request as ready for review October 14, 2025 14:21
@baync180705 baync180705 self-requested a review October 23, 2025 06:26
Copy link
Collaborator

@baync180705 baync180705 left a comment

Choose a reason for hiding this comment

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

Hey Anurag, we are using Bun as the package manager cum runtime. You have tested this code out over node js. Kindly go through the project readme and documentation once. You should delete the package-lock.json file and built the app with vite.

As far as I do remember, when we are using bun as the runtime, we do not even require to explicitly create files like tsconfig etc. Although do confirm that once.

@Anurag-Bansode
Copy link
Author

Hi @baync180705 unsure about this being mention in #7.

Initialize TypeScript (tsconfig.json) and install dependencies (typescript, @types/react, @types/react-dom, etc.).
Update build configuration (Vite/Webpack/Next) to support TypeScript.

Regarding tsconfig.json (https://bun.com/docs/typescript) came across this and have proceeded with the same.

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.

2 participants