Skip to content

Conversation

@lucagez
Copy link
Owner

@lucagez lucagez commented May 17, 2020

No description provided.

Copy link

@markmcdowell markmcdowell left a comment

Choose a reason for hiding this comment

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

The typings work with the 2 changes mentioned. Would be nice to have it merged! 👍

index.d.ts Outdated
* compile the provided schema and exports a function
* that serialize objects enforcing the schema.
*/
export function sjs(schema: SjsSchema): SjsEscaper;

Choose a reason for hiding this comment

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

Typo line 77 it should be:
export function sjs(schema: SjsSchema): SjsSerializer;

index.d.ts Outdated
*
* Serialize any object enforcing the provided schema.
*/
export type SjsSerializer = (obj: object) => string;

Choose a reason for hiding this comment

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

It would be better to use unknown here instead of object.
export type SjsSerializer = (obj: unknown) => string;

@lucagez lucagez merged commit 3b8f1ee into master Nov 30, 2020
@lucagez
Copy link
Owner Author

lucagez commented Nov 30, 2020

@markmcdowell Thanks for your review! Change has been merged and published as 2.0.1

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.

3 participants