Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
공백 변경 숨기기
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
텍스트 스타일
모양 변경
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
7년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
9 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
34 행
복사
13 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
33 행
복사
import ow from "ow";
import ow from "ow";
function myMethod(a: string): string;
function myMethod(a: string): string;
function myMethod(a: number): number;
function myMethod(a: number): number;
복사
복사됨
복사
복사됨
function myMethod(a: number, b: string):
string
;
function myMethod(a: number, b: string):
[string,
string
]
;
function myMethod(a:
any
, b?: string)
: any
{
function myMethod(a:
string | number
, b?: string)
{
if (ow.isValid(a, ow.string) && ow.isValid(b, ow.undefined)) {
if (ow.isValid(a, ow.string) && ow.isValid(b, ow.undefined)) {
console.log("function myMethod(a: string): string");
console.log("function myMethod(a: string): string");
return a;
return a;
}
}
if (ow.isValid(a, ow.number) && ow.isValid(b, ow.undefined)) {
if (ow.isValid(a, ow.number) && ow.isValid(b, ow.undefined)) {
console.log("function myMethod(a: number): number");
console.log("function myMethod(a: number): number");
return a;
return a;
}
}
if (ow.isValid(a, ow.number) && ow.isValid(b, ow.string)) {
if (ow.isValid(a, ow.number) && ow.isValid(b, ow.string)) {
복사
복사됨
복사
복사됨
console.log("function myMethod(a:
string
, b: string):
string
");
console.log("function myMethod(a:
number
, b: string):
[string,
string
]
");
return [a, b];
return [a, b];
}
}
}
}
복사
복사됨
복사
복사됨
Text moved to lines 27-30
console.log(myMethod(123));
// function myMethod(a: number): number
// 123
console.log(myMethod("Andrew"));
console.log(myMethod("Andrew"));
// function myMethod(a: string): string
// function myMethod(a: string): string
// Andrew
// Andrew
복사
복사됨
복사
복사됨
Text moved from lines 23-26
console.log(myMethod(123));
// function myMethod(a: number): number
// 123
console.log(myMethod(123, "Andrew"));
console.log(myMethod(123, "Andrew"));
복사
복사됨
복사
복사됨
// function myMethod(a:
string
, b: string):
string
// function myMethod(a:
number
, b: string):
[string,
string
]
// [123, "Andrew"]
// [123, "Andrew"]
복사
복사됨
복사
복사됨
저장된 비교 결과
원본
파일 열기
import ow from "ow"; function myMethod(a: string): string; function myMethod(a: number): number; function myMethod(a: number, b: string): string; function myMethod(a: any, b?: string): any { if (ow.isValid(a, ow.string) && ow.isValid(b, ow.undefined)) { console.log("function myMethod(a: string): string"); return a; } if (ow.isValid(a, ow.number) && ow.isValid(b, ow.undefined)) { console.log("function myMethod(a: number): number"); return a; } if (ow.isValid(a, ow.number) && ow.isValid(b, ow.string)) { console.log("function myMethod(a: string, b: string): string"); return [a, b]; } } console.log(myMethod(123)); // function myMethod(a: number): number // 123 console.log(myMethod("Andrew")); // function myMethod(a: string): string // Andrew console.log(myMethod(123, "Andrew")); // function myMethod(a: string, b: string): string // [123, "Andrew"]
수정본
파일 열기
import ow from "ow"; function myMethod(a: string): string; function myMethod(a: number): number; function myMethod(a: number, b: string): [string, string]; function myMethod(a: string | number, b?: string) { if (ow.isValid(a, ow.string) && ow.isValid(b, ow.undefined)) { console.log("function myMethod(a: string): string"); return a; } if (ow.isValid(a, ow.number) && ow.isValid(b, ow.undefined)) { console.log("function myMethod(a: number): number"); return a; } if (ow.isValid(a, ow.number) && ow.isValid(b, ow.string)) { console.log("function myMethod(a: number, b: string): [string, string]"); return [a, b]; } } console.log(myMethod("Andrew")); // function myMethod(a: string): string // Andrew console.log(myMethod(123)); // function myMethod(a: number): number // 123 console.log(myMethod(123, "Andrew")); // function myMethod(a: number, b: string): [string, string] // [123, "Andrew"]
비교하기