Skip to content
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

feat: Add type definitions #4

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: Add type definitions #4

wants to merge 1 commit into from

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Feb 27, 2025

This pull request introduces several changes to add TypeScript support and configuration for type checking in the project. The most important changes include adding a new job to the GitHub Actions workflow, updating package.json to include TypeScript dependencies and scripts, and creating TypeScript configuration and test files.

This uses https://gist.github.com/scripthunter7/3274e68ed223102246c098dcf1a772f0 as the basis for the types. It's not complete but covers most of the API.

Needs #1 before merging.

TypeScript Integration:

  • .github/workflows/build.yml: Added a new job test_types to run TypeScript checks during the CI process.
  • package.json: Added types field to specify the TypeScript declaration file and updated the exports section to include the types entry. Also added a new script test:types to run TypeScript checks and included typescript as a development dependency. [1] [2] [3]

TypeScript Configuration and Tests:

  • tests/types/tsconfig.json: Created a TypeScript configuration file for the type tests with strict settings and noEmit option.
  • tests/types/types.test.ts: Added a comprehensive TypeScript test file to validate type definitions and ensure proper type checking of the css-tree library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant