diff --git a/13-js-api-pygments/ts/src/index.ts b/13-js-api-pygments/ts/src/index.ts index b6465c3..060a25c 100644 --- a/13-js-api-pygments/ts/src/index.ts +++ b/13-js-api-pygments/ts/src/index.ts @@ -1,7 +1,7 @@ import templateHtml from './template.html'; interface Env { - PYTHON_RPC: Service; + PYTHON_RPC: HighlighterRpcService; } // Type definition for the Python RPC service methods @@ -12,7 +12,7 @@ interface HighlighterRpcService { export default { async fetch(request, env, ctx): Promise { // Get the RPC stub from the Python worker - const rpc = env.PYTHON_RPC as any as HighlighterRpcService; + const rpc = env.PYTHON_RPC; // Sample code to highlight const sampleCode = `