From e8e579794c4412e6166efaa96f4f568348b06b2b Mon Sep 17 00:00:00 2001 From: Himself65 Date: Wed, 27 Jul 2022 18:47:54 -0500 Subject: [PATCH] fix: types --- types/one.d.ts | 4 ++-- types/three.d.ts | 4 ++-- types/two.d.ts | 4 ++-- types/view/one.ts | 10 +++++----- types/view/three.ts | 2 +- types/view/two.ts | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/types/one.d.ts b/types/one.d.ts index 7759c1b26..bce4e842f 100644 --- a/types/one.d.ts +++ b/types/one.d.ts @@ -1,5 +1,5 @@ -import { Lexicon, Plugin, matchOptions, Match, Net } from './misc' -import View from './view/one' +import type { Lexicon, Plugin, matchOptions, Match, Net } from './misc' +import type View from './view/one' /** parse a given text */ declare function nlp(text: string, lexicon?: Lexicon): View diff --git a/types/three.d.ts b/types/three.d.ts index b586d9fcb..086f3a608 100644 --- a/types/three.d.ts +++ b/types/three.d.ts @@ -1,5 +1,5 @@ -import { Lexicon, Plugin, matchOptions, Match, Net } from './misc' -import View from './view/three' +import type { Lexicon, Plugin, matchOptions, Match, Net } from './misc' +import type View from './view/three' /** parse a given text */ declare function nlp(text: string, lexicon?: Lexicon): View & PluginTypes diff --git a/types/two.d.ts b/types/two.d.ts index d3397f71c..95ecc6c5d 100644 --- a/types/two.d.ts +++ b/types/two.d.ts @@ -1,5 +1,5 @@ -import { Lexicon, Plugin, matchOptions, Match, Net } from './misc' -import View from './view/two' +import type { Lexicon, Plugin, matchOptions, Match, Net } from './misc' +import type View from './view/two' /** parse a given text */ declare function nlp(text: string, lexicon?: Lexicon): View diff --git a/types/view/one.ts b/types/view/one.ts index 7b4d88f21..481155870 100644 --- a/types/view/one.ts +++ b/types/view/one.ts @@ -1,6 +1,6 @@ -import { Document, Pointer, Groups, JsonProps, outMethods, matchOptions, Term, Net } from '../misc' +import type { Document, Pointer, Groups, JsonProps, outMethods, matchOptions, Term, Net } from '../misc' -class View { +declare class View { // Utils /** is this document empty? */ found: boolean @@ -51,7 +51,7 @@ class View { /** sample a subset of the results */ random: (n?: number) => View - // Accessors + // Accessors /** split-up results by each individual term */ terms: (n?: number) => View /** grab a specific named capture group */ @@ -220,7 +220,7 @@ class View { cache: (options?: object) => View /** un-freezes the current state of the document, so it may be transformed */ uncache: (options?: object) => View - /* + /* harden: () => View soften: () => View */ @@ -232,4 +232,4 @@ class View { } -export default View \ No newline at end of file +export default View diff --git a/types/view/three.ts b/types/view/three.ts index 3a9e477b8..0c07dd60d 100644 --- a/types/view/three.ts +++ b/types/view/three.ts @@ -1,4 +1,4 @@ -import View from './two' +import type View from './two' interface Three extends View { // Selections diff --git a/types/view/two.ts b/types/view/two.ts index 2dc4c6491..1b9d104e0 100644 --- a/types/view/two.ts +++ b/types/view/two.ts @@ -1,4 +1,4 @@ -import View from './one' +import type View from './one' interface Two extends View { /** return any multi-word terms, like "didn't" */ @@ -17,4 +17,4 @@ interface Contractions extends View { expand: () => View } -export default Two \ No newline at end of file +export default Two