typings / core

*DEPRECATED* The core logic for Typings
MIT License
13 stars 11 forks source link

Does not resolve by folder name #170

Closed Delagen closed 7 years ago

Delagen commented 7 years ago

make typings of @angular/core@4.0.0-beta.7

does not resolve in @angular/core/src/errors.d.ts

import { DebugContext } from './view';

change to

import { DebugContext } from './view/index';

makes it works

blakeembrey commented 7 years ago

It hasn't for a long time and has been a long open issue. Someone is free to fix it, but since the world is moving to @types I have been happy leaving it as is. See issue tracked at https://github.com/typings/typings/issues/173.

Delagen commented 7 years ago

@types is for manually written types. Bundle is for bundle typings in single file.

blakeembrey commented 7 years ago

I don't understand your comment, maybe you could elaborate on it? Why do you need to bundle with Typings? Usually that's only for testing locally, making sure the bundle is going to be valid when used elsewhere.

Delagen commented 7 years ago

For example: module typings bundle make easier to write typescript, when base module located outside direct module resolution, i.e. resolved via bundler such as webpack. I build typing bundles of angular to eliminate need to install it locally in every project

blakeembrey commented 7 years ago

But, in that case, can't you just rely on the dependency on Angular to be resolved naturally using TypeScript? TypeScript has always resolved native modules with definitions in their package.json. The disadvantage of using Typings here is that it breaks the reason Typings was written - to avoid dependency conflicts and use external modules (bundling results in a global definitions with a hard-coded global name that can conflict now).

Delagen commented 7 years ago

Typings bundle solve the issue that you can compile typings and write code without base module install with full type checking. I know that I can use paths option, but It separate case.

Delagen commented 7 years ago

https://github.com/typings/core/pull/171