---
title: "SemanticDiff: TypeShade 셰이더 API의 도구 분류 인터페이스 참조 문서"
description: "SemanticDiff, TypeShade API의 도구 분류에 속하는 인터페이스입니다. 비교 결과의 차이를 네 가지로 분류한 것입니다."
url: https://typeshade.dev/ko/api/semanticdiff-interface/
language: ko
---

# `SemanticDiff`

인터페이스, 도구 분류

비교 결과의 차이를 네 가지로 분류한 것입니다.

`import type { SemanticDiff } from 'typeshade'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
interface SemanticDiff {
  readonly interface: readonly string[];
  readonly resources: readonly string[];
  readonly constants: readonly string[];
  readonly controlFlow: readonly string[];
}
```

## 설명

각 항목은 사실 한 줄이며, `a`에는 있고 `b`에는 없으면 `-`, 그 반대이면 `+`로 시작합니다. 네 분류가 모두 비어 있으면 두 모듈은 이 비교가 검사하는 모든 것에서 같습니다. [`isSemanticallyEqual`](https://typeshade.dev/ko/api/issemanticallyequal/)이 그 검사를 수행합니다.

## 인스턴스 속성

**`interface` 읽기 전용 `readonly string[]`**

진입점의 시그니처와 버텍스 속성 레이아웃입니다.

**`resources` 읽기 전용 `readonly string[]`**

바인드 그룹, std140/std430 구조체 레이아웃, 필요한 기능입니다.

**`constants` 읽기 전용 `readonly string[]`**

모듈 const, 파이프라인 오버라이드, 함수 본문의 숫자 리터럴 다중 집합입니다. 리터럴의 값은 여기에만 보고됩니다. 제어 흐름 골격에는 값이 빠지기 때문입니다. 그래서 상수를 바꾸는 변경과 그 주변 코드의 형태를 바꾸는 변경은 서로 다른 분류에 들어갑니다.

**`controlFlow` 읽기 전용 `readonly string[]`**

문마다 한 줄씩 적은 제어 흐름 골격이며, 각 줄은 경로로 주소를 지정합니다.

## 함께 보기

- [`isSemanticallyEqual`](https://typeshade.dev/ko/api/issemanticallyequal/)

## 소스

[`src/core/semantic-diff.ts`, 55행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/semantic-diff.ts#L55), 커밋 af54ddad5 기준
