Hyperlinkv0.8.0-beta.28

ManagedRuntime

ManagedRuntime.isManagedRuntimeconsteffect/ManagedRuntime.ts:45
(input: unknown): input is ManagedRuntime<unknown, unknown>

Checks whether the provided argument is a ManagedRuntime.

When to use

Use to narrow an unknown value before treating it as a ManagedRuntime.

Details

The guard checks the internal ManagedRuntime marker property. It does not build the layer or inspect the runtime's services.

Gotchas

Disposed runtimes still carry the marker, so this guard does not prove the runtime is still usable.

guardsmake
export const isManagedRuntime = (input: unknown): input is ManagedRuntime<unknown, unknown> =>
  hasProperty(input, TypeId)