Comments (7)
I found a solution. Adding "esModuleInterop": true
in tsconfig.json do the trick. See https://www.typescriptlang.org/tsconfig#esModuleInterop
from ngraph.graph.
Do you mind sharing a base project configuration?
from ngraph.graph.
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.
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.
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.
glad you found it!
from ngraph.graph.
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)
- Finding total of linked nodes? HOT 2
- getlink for multigraph HOT 1
- using maps instead of objects
- forEachNode typing not quite correct HOT 1
- See link direction HOT 1
- Exiting `ForEach` family of functions HOT 5
- inconsistent "replacing" behaviour between `addNode` and `addLink` HOT 1
- multigraphs and uniqueLinkId, deprecated or misdocumented? HOT 2
- `Node.links === null` when there are no links, inconsistent with type definition HOT 2
- Merging multiple graphs? HOT 2
- About weighted graph support. HOT 1
- Ngraph.graph not installing its dir to node_modules
- Linking nodes in the graph doesn't create links in the nodes
- Documentation Error: `removeLink` using two arguments
- Circular Detection HOT 2
- Update data property of Node HOT 2
- Code in bundle does not match source HOT 1
- Get link by id HOT 1
- Inconsistencies with links, multigraphs and non-oriented graphs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngraph.graph.