Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Triple Slash Directive #47

Open
SoYoung210 opened this issue Sep 6, 2020 · 0 comments
Open

TypeScript Triple Slash Directive #47

SoYoung210 opened this issue Sep 6, 2020 · 0 comments

Comments

@SoYoung210
Copy link
Owner

filename

/// <reference path='./HelloComponent.ts' />
/// <reference path='./ByeComponent.ts' />
export * from '@src/OtherComponent';

이렇게 되어 있을 때, index.d.ts는 아래와 같이 출력된다.

/// <reference type="hellocomponent" />
/// <reference path="byecomponent" />
export * from "./OtherComponent";

referecne path에 들어간 이름이 lowercase로 바뀌는 것인데, TypeScript의 Use lowercase names for type reference directives PR때문이 아닌가.. 싶다..

+ /// <reference path='./hello-component.ts' />
- /// <reference path='./HelloComponent..ts' />

로 써줬다..

relative path not working

/// <reference path='./hello-component.ts' />

이렇게 써줘도 ./가 생략되어버린다. 혹은 다른 paths로 들어가거나.. 상대경로로 참조할 수 없다.

TypeScript issue를 보고 추측한 내용을 바탕으로 tsconfig.json을 일부 수정했다.

"baseUrl": "./",
"paths": {
    "@some/*": ["src/some/*"],
    "./*": ["./*"],
    "@root/*": ["./*"],
}

./을 그대로 ./으로 치환하라는 뜻이다 (.......)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant