@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 1.07 kB
Source Map (JSON)
{"version":3,"file":"globals.cjs","names":["instance: AsyncLocalStorageInterface"],"sources":["../../../src/singletons/async_local_storage/globals.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport interface AsyncLocalStorageInterface {\n getStore: () => any | undefined;\n\n run: <T>(store: any, callback: () => T) => T;\n\n enterWith: (store: any) => void;\n}\n\nexport const TRACING_ALS_KEY = Symbol.for(\"ls:tracing_async_local_storage\");\n\nexport const _CONTEXT_VARIABLES_KEY = Symbol.for(\"lc:context_variables\");\n\nexport const setGlobalAsyncLocalStorageInstance = (\n instance: AsyncLocalStorageInterface\n) => {\n (globalThis as any)[TRACING_ALS_KEY] = instance;\n};\n\nexport const getGlobalAsyncLocalStorageInstance = ():\n | AsyncLocalStorageInterface\n | undefined => {\n return (globalThis as any)[TRACING_ALS_KEY];\n};\n"],"mappings":";;AASA,MAAa,kBAAkB,OAAO,IAAI,iCAAiC;AAE3E,MAAa,yBAAyB,OAAO,IAAI,uBAAuB;AAExE,MAAa,qCAAqC,CAChDA,aACG;CACF,WAAmB,mBAAmB;AACxC;AAED,MAAa,qCAAqC,MAEjC;AACf,QAAQ,WAAmB;AAC5B"}