GithubHelp home page GithubHelp logo

Comments (9)

7feats avatar 7feats commented on May 26, 2024 1

아.. 내보내기 문제 였군요! 시간내서 확인해주셔서 정말 감사합니다.

혹시 마지막 궁금증입니다만,, 내보내기를 따로 안해도 가능한 방법은 없겠죠?? 이거는 그냥 직관적인 느낌만 !!

그리고 제가 메일로 작은 성의 보내드렸습니다..감사합니다.

from comet-land.

hyesungoh avatar hyesungoh commented on May 26, 2024

안녕하세요.

혹시 아래와 같은 형태를 원하시는 걸까요?

// packages/core/test/index.ts

export type AbcType = string | number;
export const abc = 1;
// apps/blog/src/components/AuthorSection

import type { AbcType } from 'core/test';
import { abc } from 'core/test';

const a: AbcType = 1;
console.log(abc, a);

이와 같은 형태로 제 환경에서는 정상적으로 동작하는데,

현재 구현체를 보여주시면 더욱 정확히 답변을 드릴 수 있을 거 같아요

from comet-land.

7feats avatar 7feats commented on May 26, 2024

아 올려주신 레포를 포크 후에 좀 이래저래 수정을 많이해서요.. 엄밀히는 해당 레포의 이슈라고 보기는 어려운데.. 혹시 실례가 안된다면 한번 살펴봐주실 수 있을까요?

from comet-land.

hyesungoh avatar hyesungoh commented on May 26, 2024

아 올려주신 레포를 포크 후에 좀 이래저래 수정을 많이해서요.. 엄밀히는 해당 레포의 이슈라고 보기는 어려운데.. 혹시 실례가 안된다면 한번 살펴봐주실 수 있을까요?

깃허브 레포나 코드샌드박스 링크 작성해주시면, 시간 여유 있을 때 봐드릴게요 :D

from comet-land.

7feats avatar 7feats commented on May 26, 2024

에고, 감사합니다. 🥲
apps/api 의 index.ts 에서 타입들의 경로를 못찾는 문제입니다.
해결해줘야하는거 아닌가 하는 부담 절대 갖지마시구 어 이게 문제일수도? 정도로 팁만 주셔도 너무 감사할 것 같습니다.
그럼 시간날 떄 부탁드리겠습니다..! 좋은 하루 되세요 (이슈는 삭제해버리셔도 괜찮습니다)

https://github.com/7feats/7feats-backend

from comet-land.

hyesungoh avatar hyesungoh commented on May 26, 2024

확인해보니 root dir에 있는 tsconfigapps/api의 tsconfig가 충돌이 있는 것 같네요.

root dir의 tsconfig를 삭제 후, 아래와 같이 작성하였더니 정상 동작합니다

// apps/api/index.ts

import Foo from '@7feats/schema';
import type { ZzzType } from '@7feats/schema/hello';

export default function test() {
  console.log(Foo);
}

test();

from comet-land.

hyesungoh avatar hyesungoh commented on May 26, 2024

이슈는 close 할게요

프로젝트에 관심가져주셔서 감사합니다 :D 좋은 하루 되세요 👍

from comet-land.

7feats avatar 7feats commented on May 26, 2024

살펴봐주셔서 너무 감사합니다.. 그런데 수동으로 import 경로를 잡으면 정상적으로 동작하는데,
vscode (ide)상에서 오토 임포트 (퀵픽스)가 안되는 문제였거든요.. (command .)
혹시 이 부분도 정상작동 하셨을까요? 🥲

from comet-land.

hyesungoh avatar hyesungoh commented on May 26, 2024

@7feats
아 제가 문제를 정확히 이해하지 못했네요. packages/shema/index에 다음과 같이 export 해주시면 오토 임포트 가능하세요.

// index.ts
const zzz1 = 'hello';
export default zzz1;

export * from './hello';

스크린샷 2022-06-08 오후 3 01 52

혹은 트리쉐이킹, 디렉토리 분활을 이유로 @7feats/shema/hello와 같은 형식으로 import하시길 원하시면

import './hello';

const zzz1 = 'hello';
export default zzz1;

스크린샷 2022-06-08 오후 3 04 47

이처럼 하시면 됩니다

from comet-land.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.