createBrowserSaveTarget — @gj-kit/expo-media
A public function from @gj-kit/expo-media/web. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { createBrowserSaveTarget } from '@gj-kit/expo-media/web';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 서빙 URL을 브라우저 다운로드로 저장하는 `BrowserSaveAdapter`(§5.6). * `createMediaSaver({ target: { kind: 'browser-download', browser } })`에 꽂는다. * * ⚠ `document`/`fetch`는 **필수 주입**이다(§5.6 시그니처 · §6.1-⑬ "런타임 + 생성 차단"). * 옵셔널로 두고 `globalThis`로 폴백하면 네이티브·SSR에서도 **생성이 조용히 성공**해 * "웹 전용 API를 네이티브에서" 조합이 타입에서 걸리지 않는다 — ⑬이 막으려던 바로 그 결말이다. * `dist/web.d.ts`의 DOM 각인(§2.4)이 무DOM 소비자에게서 이 두 필드를 지켜주는 것도 * **필드가 시그니처에 존재할 때만** 의미가 있다. * 호출 시점 판정(§8.5의 `platform-unsupported`)은 내부 `createDirectBrowserSave`가 계속 맡는다 — * 비네이티브 포크(`src/save/web.ts`)는 SSR에 `document`가 없어도 조립될 수 있어야 하기 때문이다. */declare function createBrowserSaveTarget(input: { readonly document: Document; readonly fetch: typeof fetch;}): BrowserSaveAdapter;This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/expo-media - Version:
0.6.1 - Public entry:
./web - Source: GitHub