콘텐츠로 이동

virtuals/sdk

이 콘텐츠는 아직 번역되지 않았습니다.

const runSDK: any = runEffect;

Defined in: studiocms/packages/studiocms/src/virtuals/sdk/index.ts:49^

Alias for runEffect, used to run SDK effects and convert them to plain JavaScript objects.

The Effect to be converted.

A promise that resolves to the plain JavaScript object representation of the effect’s result.


const SDKCore: any;

Defined in: studiocms/packages/studiocms/src/virtuals/sdk/index.ts:22^

The main Effect-TS based SDK implementation. This unified SDK merges normal and cached SDK functionalities.

Use this as the entry point for all SDK operations. Provides access to all core features.

import { Effect } from 'studiocms/effect';
import { SDKCore } from 'studiocms:sdk';
const db = Effect.gen(function* () {
const sdk = yield* SDKCore;
return sdk.db;
});

const SDKCoreJs: any;

Defined in: studiocms/packages/studiocms/src/virtuals/sdk/index.ts:36^

Converts the SDKCore effect to a vanilla JavaScript object by removing the _tag property.

This function uses Effect.gen to yield the SDKCore effect, destructures the result to exclude the _tag property, and then passes the remaining core properties to runEffect.

A promise that resolves to the core properties of SDKCore as a plain JavaScript object.