Giter Club home page Giter Club logo

Comments (7)

tomas-javurek avatar tomas-javurek commented on August 25, 2024 1

I found a solution. Adding "esModuleInterop": true in tsconfig.json do the trick. See https://www.typescriptlang.org/tsconfig#esModuleInterop

from ngraph.graph.

anvaka avatar anvaka commented on August 25, 2024

Do you mind sharing a base project configuration?

from ngraph.graph.

tomas-javurek avatar tomas-javurek commented on August 25, 2024

I'm trying to use something like const graph = createGraph(), but it caused errors above mentioned. I found in a module index.d.ts the default function export default function createGraph... so I guess it should work well, but it doesn't.

from ngraph.graph.

anvaka avatar anvaka commented on August 25, 2024

Those errors are coming from the tooling that you use. Likely you have a typescript compiler and probably webpack/rollup/etc. Each has their own configuration - can you share those configs please?

from ngraph.graph.

tomas-javurek avatar tomas-javurek commented on August 25, 2024

This is my tsconfig.json file

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false,
    "paths": {
      "@common/*":["src/common/*"],
      "@decorators/*":["src/decorators/*"],
      "@admin/*":["src/admin/*"],
      "@modules/*":["src/modules/*"],
      "@guards/*":["src/guards/*"]
    }
  }
}

from ngraph.graph.

anvaka avatar anvaka commented on August 25, 2024

glad you found it!

from ngraph.graph.

tomas-javurek avatar tomas-javurek commented on August 25, 2024

It would be maybe very nice to support your project by defining types on npm @types/ngraph.graph. Other libraries, such ngraph.from/todot would be typed as well... It's very nice and usefull project and going accross the development in TypeScript can spread its use I guess.

from ngraph.graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.