Skip to content

chore: export view types#1104

Merged
spencermountain merged 1 commit into
spencermountain:masterfrom
Fdawgs:patch-1
Apr 27, 2024
Merged

chore: export view types#1104
spencermountain merged 1 commit into
spencermountain:masterfrom
Fdawgs:patch-1

Conversation

@Fdawgs

@Fdawgs Fdawgs commented Apr 25, 2024

Copy link
Copy Markdown
Contributor

I was previously able to declare a variable's type in VS Code using the following:

/** @type {import('compromise/types/view/three').default} */`
const test = nlp.view;

console.log(test.sentences());

This would allow Intellisense to kick in, so if i hovered over test.sentences() i'd get the following:
image

However it seems the latest minor version of TypeScript which shipped with VS Code has removed that.
This PR updates package.json to explicitly export the view types, so that the type can continue to be declared like so:

/** @type {import('compromise/view/three').default} */
const test = nlp.view

@spencermountain

Copy link
Copy Markdown
Owner

thank you!
sorry, not sure what's happened with the github script.
I owe ya a drink, Frazer.

@spencermountain spencermountain merged commit 3e7b807 into spencermountain:master Apr 27, 2024
@Fdawgs Fdawgs deleted the patch-1 branch April 28, 2024 08:15
@spencermountain spencermountain mentioned this pull request Jul 31, 2024
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