IMA SDK에서 TypeScript 사용
TypeScript는 JavaScript로 컴파일되는 엄격한 형식의 객체 지향 프로그래밍 언어입니다. TypeScript는 JavaScript의 상위 집합으로, JavaScript의 모든 기능과 선택적 정적 유형 지정을 지원합니다.
TypeScript 도구를 사용하면 일반 JavaScript에서는 눈치채지 못할 수 있는 버그를 감지하고 방지할 수 있습니다.
시작하기
DefinitelyTyped는 IMA SDK 라이브러리를 비롯한 여러 패키지의 선언 파일 유형 저장소를 유지 관리하는 오픈소스 프로젝트입니다. @types/google_interactive_media_ads_types 패키지에서 npm을 사용하여 IMA 유형을 설치할 수 있습니다.
npm install --save-dev @types/google_interactive_media_ads_types
설치 후에는 자체 코드에서 google.ima
객체에 의해 노출된 모든 유형에 액세스할 수 있습니다. 이러한 기능이 있는 소스 코드 편집기(예: Visual Studio Code)에서 IMA 메서드 및 속성에 관한 코드 완성 및 콘텐츠 지원을 활용할 수도 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-03-07(UTC)
[null,null,["최종 업데이트: 2025-03-07(UTC)"],[[["TypeScript is a strongly typed, object-oriented programming language that compiles to JavaScript and supports all of JavaScript's features plus optional static typing."],["TypeScript tooling helps in detecting and preventing bugs that might go unnoticed in plain JavaScript."],["DefinitelyTyped is an open-source project containing type declaration files for various packages, including the IMA SDK library."],["Installing the IMA types using npm from the @types/google-interactive-media-ads package gives you access to all types exposed by the google.ima object."],["After installation, source code editors with features like code completion and content assist can be used to take full advantage of IMA methods and properties."]]],[]]