Skip to content

File '/path/hsciiwapp/node_modules/hsciistr/dist/hsciistr.d.ts' is not a module.ts(2306) #61693

Closed as not planned
@zawa8

Description

@zawa8

🔎 Search Terms

  1. File '*/node_modules/hsciistr/dist/hsciistr.d.ts' is not a module.ts(2306)
  2. Error (TS2306)
  3. typescript declaration of namespace and class

🕗 Version & Regression Information

  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

https://github.com/zawa8/hsciiwapp/blob/main/src/app/page.tsx

💻 Code

// below line of page.tsx in vscode shows error but bun dev runs application without errors
// if comment this line then application stops with errors
import {hsciistr} from "hsciistr"; // https://www.npmjs.com/package/hsciistr


export default function Home() {
  const hsciistrobz = new hsciistr(hsciistr.enum_from.ascii_and_indik,hsciistr.enum_tu.all);
  const [iteksta, set_iteksta] = useState("");
  const handle_ita_change = (event: { target: { value: SetStateAction<string>; }; }) => { set_iteksta(event.target.value); };
  function on_kh2uK() { set_iteksta(hsciistrobz.setistr(iteksta).kh2hindiK().istr); }
  function on_xvjqK2u() { set_iteksta(hsciistrobz.setistr(iteksta).xvjqK2hindi().istr); }
  function on_eu2l() {  //alert("on_eu2l");
    hsciistrobz.setistr(iteksta).duztr();
    let all_output  = "";
    for (const key in hsciistrobz.ostrdict) {
      all_output += `modern_${key}: ` + hsciistrobz.ostrdict[key] + " \n" ;
    }
    set_iteksta(all_output);
}


### 🙁 Actual behavior

in vscode :- 
import {hsciistr} from "hsciistr"; **shows error**. but bun dev runs application well **without errors**
if i comment this line :-
// import {hsciistr} from "hsciistr"; ** not shows error**. but bun dev stucks application **with errors**

i am using [hsciistr npmjs library](https://www.npmjs.com/package/hsciistr) in [hsciiwapp](https://github.com/zawa8/hsciiwapp) nextjs typescript based app.

[hsciistr npmjs library source in github](https://github.com/zawa8/hsciistr) 

### 🙂 Expected behavior

import {hsciistr} from "hsciistr";   should import hscii class from dist/hsciistr.js

### Additional information about the issue

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions