enum을 호출하려면 상위 클래스, 이름, 속성을 호출합니다. 예를 들면
DocumentApp.TabType.TAB입니다.
TabType 열거형을 사용하여 특정 요소의 유형을 확인합니다. 예를 들면 다음과 같습니다.
const tab = DocumentApp.getActiveDocument().getActiveTab();
// Use getType() to determine the tab's type before casting.
if (tab.getType() === DocumentApp.TabType.DOCUMENT_TAB) {
// It's a document tab, write some text to it.
tab.asDocumentTab().setText('Hello World!');
} else {
// There are currently no types other than DOCUMENT_TAB.
}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-02(UTC)"],[[["`TabType` is an enumeration used to identify different tab types within a Google Doc."],["Currently, `DOCUMENT_TAB` is the only available tab type, representing a document tab that can be interacted with using the `DocumentTab` class."],["You can determine the type of a tab using `getType()` and then perform actions based on its specific type, such as adding text to a `DOCUMENT_TAB`."]]],[]]