Skip to content

Conversation

@narinluangrath
Copy link
Contributor

Two fixes to our type definitions and a no-op code change

  1. Prism.tokenize only takes two arguments not three
  2. Users can provider their own PrismJS module (closes TypeScript: PrismJS from npm is not assignable to Prism prop #136)

@@ -1,5 +1,6 @@
declare module "prism-react-renderer" {
import * as React from "react";
import type PrismJS from 'prismjs';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there additional work needed to ensure this type definition gets included in the npm package?

Copy link
Contributor

Choose a reason for hiding this comment

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

no additional work needed -- index.d.ts is already included in the tar

Copy link
Contributor

@jpdriver jpdriver left a comment

Choose a reason for hiding this comment

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

LGTM nice catch @narinluangrath thanks

@@ -1,5 +1,6 @@
declare module "prism-react-renderer" {
import * as React from "react";
import type PrismJS from 'prismjs';
Copy link
Contributor

Choose a reason for hiding this comment

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

no additional work needed -- index.d.ts is already included in the tar

@narinluangrath narinluangrath merged commit c143067 into master Aug 19, 2022
@narinluangrath narinluangrath deleted the fix/types branch August 19, 2022 21:18
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.

TypeScript: PrismJS from npm is not assignable to Prism prop

4 participants