linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

No declaration files found #443

Closed ludwigschub closed 3 years ago

ludwigschub commented 3 years ago

Getting these errors when using the latest release in my ts project:

node_modules/rdflib/lib/index.d.ts:3:26 - error TS7016: Could not find a declaration file for module './convert'. '/node_modules/rdflib/lib/convert.js' implicitly has an 'any' type.

3 import * as convert from './convert';
                           ~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:8:24 - error TS7016: Could not find a declaration file for module './jsonparser'. '/node_modules/rdflib/lib/jsonparser.js' implicitly has an 'any' type.

8 import jsonParser from './jsonparser';
                         ~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:10:17 - error TS7016: Could not find a declaration file for module './log'. '/node_modules/rdflib/lib/log.js' implicitly has an 'any' type.

10 import log from './log';
                   ~~~~~~~

node_modules/rdflib/lib/index.d.ts:11:22 - error TS7016: Could not find a declaration file for module './n3parser'. '/node_modules/rdflib/lib/n3parser.js' implicitly has an 'any' type.

11 import N3Parser from './n3parser';
                        ~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:16:23 - error TS7016: Could not find a declaration file for module './query'. '/node_modules/rdflib/lib/query.js' implicitly has an 'any' type.

16 import { Query } from './query';
                         ~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:17:27 - error TS7016: Could not find a declaration file for module './query-to-sparql'. '/node_modules/rdflib/lib/query-to-sparql.js' implicitly has an 'any' type.

17 import queryToSPARQL from './query-to-sparql';
                             ~~~~~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:18:27 - error TS7016: Could not find a declaration file for module './rdfaparser'. '/node_modules/rdflib/lib/rdfaparser.js' implicitly has an 'any' type.

18 import RDFaProcessor from './rdfaparser';
                             ~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:19:23 - error TS7016: Could not find a declaration file for module './rdfxmlparser'. '/node_modules/rdflib/lib/rdfxmlparser.js' implicitly has an 'any' type.

19 import RDFParser from './rdfxmlparser';
                         ~~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:21:24 - error TS7016: Could not find a declaration file for module './serializer'. '/node_modules/rdflib/lib/serializer.js' implicitly has an 'any' type.

21 import Serializer from './serializer';
                          ~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:22:27 - error TS7016: Could not find a declaration file for module './sparql-to-query'. '/node_modules/rdflib/lib/sparql-to-query.js' implicitly has an 'any' type.

22 import SPARQLToQuery from './sparql-to-query';
                             ~~~~~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:23:32 - error TS7016: Could not find a declaration file for module './patch-parser'. '/node_modules/rdflib/lib/patch-parser.js' implicitly has an 'any' type.

23 import sparqlUpdateParser from './patch-parser';
                                  ~~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:26:31 - error TS7016: Could not find a declaration file for module './updates-via'. '/node_modules/rdflib/lib/updates-via.js' implicitly has an 'any' type.

26 import { UpdatesSocket } from './updates-via';
                                 ~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:27:28 - error TS7016: Could not find a declaration file for module './updates-via'. '/node_modules/rdflib/lib/updates-via.js' implicitly has an 'any' type.

27 import { UpdatesVia } from './updates-via';
                              ~~~~~~~~~~~~~~~

node_modules/rdflib/lib/index.d.ts:29:23 - error TS7016: Could not find a declaration file for module './utils-js'. '/node_modules/rdflib/lib/utils-js.js' implicitly has an 'any' type.

29 import * as Util from './utils-js';
                         ~~~~~~~~~~~~

node_modules/rdflib/lib/store.d.ts:5:23 - error TS7016: Could not find a declaration file for module './query'. '/node_modules/rdflib/lib/query.js' implicitly has an 'any' type.

5 import { Query } from './query';
                        ~~~~~~~~~
ludwigschub commented 3 years ago

was able to get around this by modifying my tsconfig.json

  "compilerOptions":
    ...
    "noImplicitAny": false,