Comments (10)
from configuration.
I don't think I understand the error. Does that mean Typescript errors on every npm module that doesn't have definitions?
from configuration.
@daffl The prior error I mentioned seems to occur when TS detects a declaration file but doesn't have any content (I had commented out the module definition). If the TS declaration file isn't present for a module that's being imported, you'd see this:
Could not find a declaration file for module 'feathers-configuration'. '/path-to/node_modules/feathers-configuration/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/feathers-configuration` if it exists or add a new declaration (.d.ts) file containing `declare module 'feathers-configuration';`
from configuration.
But there is no declaration at all in this repository. Not that we wouldn't accept one but it should be complete (and not having one at all shouldn't cause any errors).
from configuration.
But there is no declaration at all in this repository
That's the issue. If TS is configured to use "strict": true
or "noImplicitAny": true
the error I mentioned (TS7016) will be thrown and prevent the project from compiling. Folks opting to relax the strictness options won't see the error, but that seems to defeat the purpose of a type checker like TypeScript.
from configuration.
The PR I just created should fix the issue for the current version.
from configuration.
Hey, still having
src/app.ts(9,32): error TS2497: Module '"C:/Users/andre/js-dev/reactnative/api/node_modules/feathers-configuration/index"' resolves to a non-modul
e entity and cannot be imported using this construct.
using this import syntax
import * as configuration from "feathers-configuration";
Are you sure of type definition or am I doing it wrong ?
Please also consider adding @types/config
to dependencies. This avoid developers to include this in their own project for this warning node_modules/feathers-configuration/index.d.ts(4,23): error TS2688: Cannot find type definition file for 'config'.
Best regards
from configuration.
If you're using the latest versions (>1.0.0-pre.*) it seems like the file was removed in this commit 4cdff7a .
Sorry, but I won't be able to maintain the definitions file since I'm not using FeathersJS in my stack at the moment.
from configuration.
That is why it is a prerelease
from configuration.
@daffl I can only suggest you to publish them using the standardized way. See that link.
Feathers is an awesome tool, built with perfect nice pattern that make the code clear. It deserve an awesome definition file for its packages.
Keep it that way :)
@types/feathers
@types/feathers-rest
etc...
Or directly in the lib using the types key of package.json.
Best regards
from configuration.
Related Issues (19)
- PR: Support modules in config
- <NODE_ENV>.json config need deep merge options HOT 2
- Configuration should recursively go through the values HOT 4
- A way to have local override HOT 1
- Make this repo more about managing configuration HOT 6
- Deprecate v1 in favour of node-config
- Configuration Management HOT 4
- Move config options to app.config instead of the Express app object. HOT 1
- Why use "NODE_ENV=development" with default.json? HOT 3
- Docs are wrong HOT 2
- Stuck in configuration loophole... HOT 3
- Nested configuration HOT 2
- Needs an escape character HOT 9
- Getting Env name HOT 5
- Prevent automatic expansion of environment variables HOT 13
- Feathers writing in typescript fails to boot on configuration HOT 2
- Config adding a value of userName in runtime its overwritten to the OS name HOT 1
- Investigate node-config HOT 19
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 configuration.