[참고용]union 과 intersection
235
작성한 질문수 29
이름은 분명히 union이니까 합집합 같은데 하는건 교집합같은 것(or연산자를 이용해서)을 하고 있고.. 뭐지 너무 헷갈리네해서 찾아봤는데요 참고 하실분들 참고하세요
타입스크립트 공홈에서 퍼왔습니다.
It might be confusing that a union of types appears to have the intersection of those types’ properties. This is not an accident - the name union comes from type theory. The union
number | stringis composed by taking the union of the values from each type. Notice that given two sets with corresponding facts about each set, only the intersection of those facts applies to the union of the sets themselves. For example, if we had a room of tall people wearing hats, and another room of Spanish speakers wearing hats, after combining those rooms, the only thing we know about every person is that they must be wearing a hat.
답변 1
TSLint
0
76
1
vscode eslint server 오류
0
95
1
안녕하세요. 기본타입- 튜플, 객체, 진위값 부분의 영상의 화면이 나오질 않습니다.
0
84
1
live server 설치 오류
1
394
2
강의 교안 pdf 는 따로 제공하지않나요?
0
294
2
npm i 설치 이유 문의
1
425
3
index.ts Delete `␍`eslintprettier/prettier 오류(빨간줄) 해결
2
302
3
vue 에서 jquery 사용 문제
1
707
2
TSLint 확장 프로그램은 현재 지원하지 않는다고 합니다.
1
508
2
강의 내용처럼 노란 밑줄이 작동하지 않아서 유사 질문들을 실행해보았는데요
1
551
1
section 3-1 JSdoc 타입이 추론되지 않아서 다음과 같이 수정했는데 이거 맞나요?
1
462
2
함수에 리턴 안됐다고 노란밑줄이 쳐져야하는데 없습니다
2
461
1
파일이 다른데 식별자가 중복되었다고 뜹니다.
1
458
2
빨간줄 에러 질문드립니다
1
496
2
마우스 갖다대면 리턴값 설명 나오는 거 질문드려요
1
364
2
js에서 @ts-check 적어도 체크하지 못하는 문제입니다
2
403
2
index.html에서 타입스크립트 콘솔 찍는 법 질문드립니다
1
574
2
섹션 1-3 추론 질문드립니다
1
360
2
왜 api쪽에는 왜 에러가 안나는지 궁금합니다.
1
332
2
const item1을 선언했을 때 타입을 선언해줘도 괜찮을까요?
1
401
1
전화번호부 타입선언
1
271
2
타입을 전역으로 분리
1
600
2
객체 선언 시 구분자는 쉼표, 세미콜론 모두 사용가능한건가요?
1
461
1
Git 관련 질문이 있습니다
1
673
2





