Binding service RPC using Typescript

Hi,
I’m trying to use service binding RPC with Typescript. My learning POC works, but I can’t figure out how to get the service class definition from my Service to the client. In javascript it works without problem in Typescript too, but with errors. (Property ‘ping’ does not exist on type)
Service Worker

import { WorkerEntrypoint } from "cloudflare:workers";

export default class extends WorkerEntrypoint {
	async ping() : Promise<Number>{
		console.log('Call: ping');
		return Date.now()
	}
};

Client Worker

Interface Env {
	SERVICE_TS_TEST_A: Fetcher;
}
export default {
	async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
		const value = await env.SERVICE_TS_TEST_A.ping();
		return new Response(`${value}`,{status: 200});
           }
}
[[services]]
binding = "SERVICE_TS_TEST_A"
service = "service-ts-test-a"

Documentation 2) example snippet:

interface Env {
  SUM_SERVICE: Service<SumService>;
}

My question is how do I make this association? In the example, how and where is the SumService type defined ?

Thanks for advices.

Documentation I used:

  1. Service bindings - RPC (WorkerEntrypoint) · Cloudflare Workers docs
  2. Workers RPC — TypeScript · Cloudflare Workers docs