Skip to content

createStreaming function freezes during execution #7

Open
@scarf005

Description

@scarf005

Summary

createStreaming takes forever when running example code from deno.land

import {
  createStreaming,
  GlobalConfiguration,
} from "https://deno.land/x/dprint/mod.ts"

const globalConfig: GlobalConfiguration = {
  indentWidth: 2,
  lineWidth: 80,
}
const tsFormatter = await createStreaming(
  // check https://plugins.dprint.dev/ for latest plugin versions
  fetch("https://plugins.dprint.dev/typescript-0.57.0.wasm"),
)

tsFormatter.setConfig(globalConfig, {
  semiColons: "asi",
})

// outputs: "const t = 5\n"
console.log(tsFormatter.formatText("file.ts", "const   t    = 5;"))

System version

deno --version
deno 1.31.1 (release, x86_64-unknown-linux-gnu)
v8 11.0.226.13
typescript 4.9.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions