Skip to content

Function: sourceUriOf() ​

sourceUriOf(source): string

Defined in: packages/react-native-spritestudio/src/player/source.ts:49

The URI a source names, unwrapped but not yet normalised.

Also where a require() is caught. TypeScript rejects one, but a JS caller gets a module id — an opaque number — and the failure it would otherwise cause is a part that silently is not there.

Separate from resolveSourceUri so <SpriteStudioView> can key its load effect on the URI (an inline { uri } is a new object every render) without a second copy of this check.

Parameters ​

source ​

SsSource

Returns ​

string