Skip to content

fix(deps): update @textlint/ast-node-types and refactor types #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

azu
Copy link
Member

@azu azu commented Nov 25, 2023

Make acceptable node loose.

It allow to pass sentence node to new StringSource(node).

import { split, TxtSentenceNode } from "sentence-splitter";
import { StringSource } from "../src/StringSource";
const results = split("Hello world. This is a test.");
const [sentence1, sentence2] = results.filter((r) => {
    return r.type === "Sentence";
}) as TxtSentenceNode[];
const source = new StringSource(sentence1).toString()

It is intentionally loose definition to accept sentences-splitter's node and unist node.

Make acceptable node loose.
It is intentionally loose definition to accept sentences-splitter's node and unist node.
@azu azu added the Type: Refactoring A code change that neither fixes a bug nor adds a feature label Nov 25, 2023
@azu azu changed the title fix(deps): update @textlint/ast-node-types fix(deps): update @textlint/ast-node-types and refactor types Nov 25, 2023
@azu azu merged commit d9a323a into master Nov 25, 2023
@azu azu deleted the update-textlint-types branch November 25, 2023 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Refactoring A code change that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant