Skip to content

Conversation

@Rohit12012007
Copy link

@Rohit12012007 Rohit12012007 commented Oct 10, 2025

The corrected version of the code improves structure, readability, and type safety while aligning it with modern TypeScript and PostCSS standards. The first key change is updating the import statement from import { type Plugin as PostCssPlugin } to import type { Plugin as PostCSSPlugin }, which follows the official TypeScript 5+ syntax and corrects the capitalization of “PostCSS.”

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Refactors types/postcss-discard-font-face.d.ts to use type-only import, export refined typings, update docs, and remove the discardFontFace export.

  • types/postcss-discard-font-face.d.ts
    • Use import type { Plugin as PostCSSPlugin } (capitalization + type-only).
    • Export typings: FilterFunction, Allowlist; redefine Properties as an interface with (string | number)[]; Options as { font: Record<string, Properties> }.
    • Update JSDoc/examples to concise TS format and clarified semantics.
    • Remove discardFontFace function declaration and export = discardFontFace.

Written by Cursor Bugbot for commit b6801ba. This will update automatically on new commits. Configure here.

The corrected version of the code improves structure, readability, and type safety while aligning it with modern TypeScript and PostCSS standards. The first key change is updating the import statement from import { type Plugin as PostCssPlugin } to import type { Plugin as PostCSSPlugin }, which follows the official TypeScript 5+ syntax and corrects the capitalization of “PostCSS.”
@github-actions
Copy link
Contributor

CLA Signature Action:

Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:

I have read the CLA Document and I hereby sign the CLA

By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository.

0 out of 1 committers have signed the CLA.
@Rohit12012007

}
export interface Options {
font: Record<string, Properties>;
}
Copy link

Choose a reason for hiding this comment

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

Bug: Missing Function Breaks Module API

The discardFontFace function and its export were removed from the module's type definition. This leaves the module exporting only types, without the actual function, breaking its API. Consumers can no longer import and use the plugin, which will cause compilation errors.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants