샘플
@types/react-dom 19.2.4
검증된 샘플 — npm @types/react-dom 19.2.4. node 22 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다: @types/react-dom package.json declares type definitions…
sha256:5a92fdbb03f0475daa474f879c12afd8897daa4aa9b0d1d27e4b5c0989c6ee04
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 2
- 빌드한 서명 키
- 1
선언된 환경
linux 24 · ubuntu · glibc 2.39 x64 npm
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-23 |
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-07 |
케이스
HOW- 목표
- verify pkg:npm/%40types/react-dom@19.2.4
- 생성일
- 2026-08-23T15:07:15Z
컨트랙트
- @types/react-dom package.json declares type definitions entry point index.d.ts, version 19.2.4, and subpath exports for client, server, and static entrypoints
- index.d.ts declaration file declares core React DOM 19 APIs including createPortal, flushSync, useFormStatus, and useFormState
- index.d.ts declares resource preloading and preinitialization APIs including preload, prefetchDNS, preconnect, and preinit
- client.d.ts declaration file declares createRoot, hydrateRoot, and client root management interfaces
- server.d.ts declaration file declares streaming and static rendering functions including renderToPipeableStream and renderToReadableStream
- static.d.ts declaration file declares React 19 static prerendering functions including prerender and prerenderToNodeStream
- Helper inspection module loads and verifies all React DOM 19 type declaration files and exported signature structures
파일
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.mjs
- test/contract.mjs
소스
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/%40types/react-dom@19.2.4
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/react-dom@19.2.4
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:a96a04435447a02091f3884dc18b7deeb030dd29371772bf9f6fc6135ed592b7","contract":["@types/react-dom package.json declares type definitions entry point index.d.ts, version 19.2.4, and subpath exports for client, server, and static entrypoints","index.d.ts declaration file declares core React DOM 19 APIs including createPortal, flushSync, useFormStatus, and useFormState","index.d.ts declares resource preloading and preinitialization APIs including preload, prefetchDNS, preconnect, and preinit","client.d.ts declaration file declares createRoot, hydrateRoot, and client root management interfaces","server.d.ts declaration file declares streaming and static rendering functions including renderToPipeableStream and renderToReadableStream","static.d.ts declaration file declares React 19 static prerendering functions including prerender and prerenderToNodeStream","Helper inspection module loads and verifies all React DOM 19 type declaration files and exported signature structures"],"goal":"verify pkg:npm/%40types/react-dom@19.2.4","kind":"HOW","packages":["pkg:npm/%40types/react-dom@19.2.4"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40types/react-dom@19.2.4"],"schemaVersion":1,"subject":"pkg:npm/%40types/react-dom@19.2.4","verifierAdapter":"node-typescript@1"}
{
"name": "sample-react-dom-types",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-react-dom-types",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/react-dom": "19.2.4"
}
},
"node_modules/@types/react": {
"version": "19.2.18",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz",
"integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",
"license": "MIT",
"peer": true,
"dependencies": {
"csstype": "^3.2.2"
}
},
"node_modules/@types/react-dom": {
"version": "19.2.4",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.4.tgz",
"integrity": "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==",
"license": "MIT",
"peerDependencies": {
"@types/react": "^19.2.0"
}
},
"node_modules/csstype": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"license": "MIT",
"peer": true
}
}
}
{
"name": "sample-react-dom-types",
"version": "1.0.0",
"private": true,
"license": "MIT-0",
"dependencies": {
"@types/react-dom": "19.2.4"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40types/react-dom@19.2.4",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/react-dom@19.2.4"
]
}
import fs from 'node:fs';
import path from 'node:path';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
/**
* Returns the absolute directory path of the installed @types/react-dom package.
* @returns {string} Directory path
*/
export function getReactDomTypesDir() {
const pkgPath = require.resolve('@types/react-dom/package.json');
return path.dirname(pkgPath);
}
/**
* Resolves the path to a declaration or resource file in @types/react-dom.
* @param {string} [subPath='index.d.ts'] - Relative declaration file path
* @returns {string} Absolute path to declaration file
*/
export function getDeclarationPath(subPath = 'index.d.ts') {
return path.join(getReactDomTypesDir(), subPath);
}
/**
* Loads the text content of a declaration file in @types/react-dom.
* @param {string} [subPath='index.d.ts'] - Relative declaration file path
* @returns {string} Text content of the declaration file
*/
export function loadDeclarationContent(subPath = 'index.d.ts') {
const declPath = getDeclarationPath(subPath);
return fs.readFileSync(declPath, 'utf8');
}
/**
* Inspects core React DOM TypeScript declaration signatures across entry points.
* @returns {object} Summary of discovered type definitions
*/
export function inspectTypeDefinitions() {
const indexContent = loadDeclarationContent('index.d.ts');
const clientContent = loadDeclarationContent('client.d.ts');
const serverContent = loadDeclarationContent('server.d.ts');
const staticContent = loadDeclarationContent('static.d.ts');
return {
index: {
hasCreatePortal: indexContent.includes('function createPortal('),
hasFlushSync: indexContent.includes('function flushSync<R>('),
hasUnstableBatchedUpdates: indexContent.includes('function unstable_batchedUpdates<'),
hasUseFormStatus: indexContent.includes('function useFormStatus(): FormStatus;'),
hasUseFormState: indexContent.includes('function useFormState<State>('),
hasPrefetchDNS: indexContent.includes('function prefetchDNS('),
hasPreconnect: indexContent.includes('function preconnect('),
hasPreload: indexContent.includes('function preload('),
hasPreloadModule: indexContent.includes('function preloadModule('),
hasPreinit: indexContent.includes('function preinit('),
hasPreinitModule: indexContent.includes('function preinitModule('),
hasRequestFormReset: indexContent.includes('function requestFormReset('),
hasVersionConst: indexContent.includes('const version: string;')
},
client: {
hasCreateRoot: clientContent.includes('function createRoot('),
hasHydrateRoot: clientContent.includes('function hydrateRoot('),
hasRootInterface: clientContent.includes('interface Root {'),
hasRootOptionsInterface: clientContent.includes('interface RootOptions {'),
hasHydrationOptionsInterface: clientContent.includes('interface HydrationOptions {')
},
server: {
hasRenderToString: serverContent.includes('function renderToString('),
hasRenderToStaticMarkup: serverContent.includes('function renderToStaticMarkup('),
hasRenderToPipeableStream: serverContent.includes('function renderToPipeableStream('),
hasRenderToReadableStream: serverContent.includes('function renderToReadableStream(')
},
static: {
hasPrerenderToNodeStream: staticContent.includes('function prerenderToNodeStream('),
hasPrerender: staticContent.includes('function prerender(')
}
};
}
import assert from 'node:assert/strict';
import fs from 'node:fs';
import { createRequire } from 'node:module';
import {
getReactDomTypesDir,
getDeclarationPath,
loadDeclarationContent,
inspectTypeDefinitions
} from '../src/index.mjs';
const require = createRequire(import.meta.url);
// Contract 1: @types/react-dom package.json declares type definitions entry point index.d.ts, version 19.2.4, and subpath exports for client, server, and static entrypoints
{
const pkgJson = require('@types/react-dom/package.json');
assert.equal(pkgJson.name, '@types/react-dom');
assert.equal(pkgJson.version, '19.2.4');
assert.equal(pkgJson.types, 'index.d.ts');
assert.ok(pkgJson.exports['.']);
assert.ok(pkgJson.exports['./client']);
assert.ok(pkgJson.exports['./server']);
assert.ok(pkgJson.exports['./static']);
assert.ok(pkgJson.peerDependencies['@types/react']);
}
// Contract 2: index.d.ts declaration file declares core React DOM 19 APIs including createPortal, flushSync, useFormStatus, and useFormState
{
const indexContent = loadDeclarationContent('index.d.ts');
assert.ok(indexContent.includes('function createPortal('));
assert.ok(indexContent.includes('function flushSync<R>('));
assert.ok(indexContent.includes('function useFormStatus(): FormStatus;'));
assert.ok(indexContent.includes('function useFormState<State>('));
assert.ok(indexContent.includes('interface FormStatusPending'));
assert.ok(indexContent.includes('interface FormStatusNotPending'));
}
// Contract 3: index.d.ts declares resource preloading and preinitialization APIs including preload, prefetchDNS, preconnect, and preinit
{
const indexContent = loadDeclarationContent('index.d.ts');
assert.ok(indexContent.includes('function prefetchDNS('));
assert.ok(indexContent.includes('function preconnect('));
assert.ok(indexContent.includes('function preload('));
assert.ok(indexContent.includes('function preloadModule('));
assert.ok(indexContent.includes('function preinit('));
assert.ok(indexContent.includes('function preinitModule('));
assert.ok(indexContent.includes('function requestFormReset('));
}
// Contract 4: client.d.ts declaration file declares createRoot, hydrateRoot, and client root management interfaces
{
const clientPath = getDeclarationPath('client.d.ts');
assert.ok(fs.existsSync(clientPath));
const clientContent = loadDeclarationContent('client.d.ts');
assert.ok(clientContent.includes('function createRoot('));
assert.ok(clientContent.includes('function hydrateRoot('));
assert.ok(clientContent.includes('interface Root {'));
assert.ok(clientContent.includes('interface RootOptions {'));
assert.ok(clientContent.includes('interface HydrationOptions {'));
}
// Contract 5: server.d.ts declaration file declares streaming and static rendering functions including renderToPipeableStream and renderToReadableStream
{
const serverPath = getDeclarationPath('server.d.ts');
assert.ok(fs.existsSync(serverPath));
const serverContent = loadDeclarationContent('server.d.ts');
assert.ok(serverContent.includes('function renderToString('));
assert.ok(serverContent.includes('function renderToStaticMarkup('));
assert.ok(serverContent.includes('function renderToPipeableStream('));
assert.ok(serverContent.includes('function renderToReadableStream('));
}
// Contract 6: static.d.ts declaration file declares React 19 static prerendering functions including prerender and prerenderToNodeStream
{
const staticPath = getDeclarationPath('static.d.ts');
assert.ok(fs.existsSync(staticPath));
const staticContent = loadDeclarationContent('static.d.ts');
assert.ok(staticContent.includes('function prerenderToNodeStream('));
assert.ok(staticContent.includes('function prerender('));
}
// Contract 7: Helper inspection module loads and verifies all React DOM 19 type declaration files and exported signature structures
{
const inspection = inspectTypeDefinitions();
assert.equal(inspection.index.hasCreatePortal, true);
assert.equal(inspection.index.hasFlushSync, true);
assert.equal(inspection.index.hasUseFormStatus, true);
assert.equal(inspection.index.hasUseFormState, true);
assert.equal(inspection.index.hasPrefetchDNS, true);
assert.equal(inspection.index.hasPreconnect, true);
assert.equal(inspection.index.hasPreload, true);
assert.equal(inspection.index.hasPreloadModule, true);
assert.equal(inspection.index.hasPreinit, true);
assert.equal(inspection.index.hasPreinitModule, true);
assert.equal(inspection.index.hasRequestFormReset, true);
assert.equal(inspection.client.hasCreateRoot, true);
assert.equal(inspection.client.hasHydrateRoot, true);
assert.equal(inspection.client.hasRootInterface, true);
assert.equal(inspection.server.hasRenderToString, true);
assert.equal(inspection.server.hasRenderToStaticMarkup, true);
assert.equal(inspection.server.hasRenderToPipeableStream, true);
assert.equal(inspection.server.hasRenderToReadableStream, true);
assert.equal(inspection.static.hasPrerenderToNodeStream, true);
assert.equal(inspection.static.hasPrerender, true);
}
console.log('All @types/react-dom contract tests passed successfully.');
오리진 시더
익명