Skip to content

Commit

Permalink
Use TypeScript instead of Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Dec 18, 2023
1 parent 0292822 commit 7d4c790
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
required: false
type: string
tourVersion:
description: "Typescript+Java tour version (without prepending v)."
description: "TypeScript+Java tour version (without prepending v)."
required: false
type: string

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ ./tools/generate.sh <PATH to Restate repo clone>

The config file `restate.config.json` contains versions of various Restate artifacts:

* Typescript SDK: `TYPESCRIPT_SDK_VERSION`
* TypeScript SDK: `TYPESCRIPT_SDK_VERSION`
* Java SDK: `JAVA_SDK_VERSION`
* Runtime: `RESTATE_VERSION`
* Tour: `TOUR_VERSION` (This counts for the Typescript and Java Tour).
* Tour: `TOUR_VERSION` (This counts for the TypeScript and Java Tour).
2 changes: 1 addition & 1 deletion docs/restate/managed_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are several API endpoints at this hostname:

### Registering services (8081)
A Restate meta endpoint, which can be used to register Restate Lambda functions written in
[Typescript](/services/deployment/lambda/lambda-typescript#discovering-the-services-behind-the-lambda-endpoint) and [Java](/services/deployment/lambda/lambda-java#discovering-the-services-behind-the-lambda-endpoint),
[TypeScript](/services/deployment/lambda/lambda-typescript#discovering-the-services-behind-the-lambda-endpoint) and [Java](/services/deployment/lambda/lambda-java#discovering-the-services-behind-the-lambda-endpoint),
with a bearer token set.
```bash
curl -H "Authorization: Bearer $(cat /token)" https://yourcluster.dev.restate.cloud:8081/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/my-greeter", "additional_headers": {"x-api-key": "your-api-key"} }'
Expand Down
2 changes: 1 addition & 1 deletion docs/services/sdk/kafka.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Kafka support is in development, and it isn't ready for production usage. Next r
Depending on your use case you can build different types of event handlers. We distinguish between the following scenarios:

* Handle events with a string key from Kafka in Restate services keyed with a `string` key.
* Process generic events from Kafka in order (currently only supported by the Typescript gRPC API and the Java API.)
* Process generic events from Kafka in order (currently only supported by the TypeScript gRPC API and the Java API.)

Check notice on line 26 in docs/services/sdk/kafka.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/kafka.mdx#L26

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/services/sdk/kafka.mdx", "range": {"start": {"line": 26, "column": 46}}}, "severity": "INFO"}

Check warning on line 26 in docs/services/sdk/kafka.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/kafka.mdx#L26

[write-good.Weasel] 'currently' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'currently' is a weasel word!", "location": {"path": "docs/services/sdk/kafka.mdx", "range": {"start": {"line": 26, "column": 47}}}, "severity": "WARNING"}

Check warning on line 26 in docs/services/sdk/kafka.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/kafka.mdx#L26

[write-good.Weasel] 'only' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'only' is a weasel word!", "location": {"path": "docs/services/sdk/kafka.mdx", "range": {"start": {"line": 26, "column": 57}}}, "severity": "WARNING"}

An event handlers can profit from the same features as other Restate handlers, including durable execution, [service communication](/services/sdk/service-communication) and [side effects](/services/sdk/side-effects).

Expand Down
12 changes: 6 additions & 6 deletions docs/services/sdk/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
sidebar_position: 1
description: "Get an idea of what a Restate Typescript service looks like."
description: "Get an idea of what a Restate TypeScript service looks like."
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Overview

Restate offers a Java SDK ([sdk-java repo](https://github.com/restatedev/sdk-java)) and a Typescript SDK ([sdk-typescript repo](https://github.com/restatedev/sdk-typescript)).
Restate offers a Java SDK ([sdk-java repo](https://github.com/restatedev/sdk-java)) and a TypeScript SDK ([sdk-typescript repo](https://github.com/restatedev/sdk-typescript)).

Check notice on line 11 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L11

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 11, "column": 1}}}, "severity": "INFO"}

Check failure on line 11 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L11

[Vale.Spelling] Did you really mean 'repo'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'repo'?", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 11, "column": 38}}}, "severity": "ERROR"}

Check failure on line 11 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L11

[Vale.Spelling] Did you really mean 'repo'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'repo'?", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 11, "column": 123}}}, "severity": "ERROR"}

## Installation

Expand All @@ -23,7 +23,7 @@ To get started quickly, use the [template generator](https://github.com/restated
Add the `@restatedev/restate-sdk` dependency to your NodeJS project to start developing Restate services.

:::info
Restate currently supports two Typescript APIs for implementing services: the Handler API and the gRPC API.
Restate currently supports two TypeScript APIs for implementing services: the Handler API and the gRPC API.

Check warning on line 26 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L26

[write-good.Weasel] 'currently' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'currently' is a weasel word!", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 26, "column": 9}}}, "severity": "WARNING"}

Check failure on line 26 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L26

[Vale.Spelling] Did you really mean 'APIs'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'APIs'?", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 26, "column": 43}}}, "severity": "ERROR"}
The gRPC API requires you to specify the services, methods and data types via a Protobuf definition, as explained in the [service contract docs](/services/service_type#restate-service-contract).
The Handler API does not require this.
:::
Expand Down Expand Up @@ -104,7 +104,7 @@ For Maven you can use the [xolstice Protobuf plugin](https://www.xolstice.org/pr
<Tabs groupId="sdk" queryString>
<TabItem value="ts" label="TypeScript" default>

Below is an example of a Typescript service with the Handler API.
Below is an example of a TypeScript service with the Handler API.

Check notice on line 107 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L107

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 107, "column": 7}}}, "severity": "INFO"}

This example shows a greeter service comprising two methods:
- `greet`: returns a greeting as a response without performing any additional operations.
Expand Down Expand Up @@ -147,9 +147,9 @@ For more information on how to set up the routers and the Restate server, have a
</TabItem>
<TabItem value="ts-grpc" label="TypeScript-gRPC">

Below is an example of a Typescript gRPC service.
Below is an example of a TypeScript gRPC service.

Check notice on line 150 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L150

[write-good.E-Prime] Try to avoid using 'is'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'is'.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 150, "column": 7}}}, "severity": "INFO"}

The [gRPC](https://grpc.io/) API uses the `protobufjs` and `ts-proto` dependencies to work with the [Protobuf](https://protobuf.dev/)-generated Typescript code. So add these as well to your `package.json`.
The [gRPC](https://grpc.io/) API uses the `protobufjs` and `ts-proto` dependencies to work with the [Protobuf](https://protobuf.dev/)-generated TypeScript code. So add these as well to your `package.json`.

Check failure on line 152 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L152

[Vale.Spelling] Did you really mean 'Protobuf'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Protobuf'?", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 152, "column": 102}}}, "severity": "ERROR"}

Check failure on line 152 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L152

[write-good.So] Don't start a sentence with 'So '.
Raw output
{"message": "[write-good.So] Don't start a sentence with 'So '.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 152, "column": 162}}}, "severity": "ERROR"}

This example shows a greeter service comprising two methods:
- `greet`: returns a greeting as a response without performing any additional operations.
Expand Down
2 changes: 1 addition & 1 deletion docs/services/service_type.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A common use case for keyed services is to model an entity of your application.
Because keyed services are executed serially on a per-key basis, it means that invocations will execute in the same order in which they are enqueued. For example, assume the following code in `ServiceA`:

<Tabs groupId="sdk" queryString>
<TabItem value="ts" label="Typescript">
<TabItem value="ts" label="TypeScript">

Check notice on line 34 in docs/services/service_type.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/service_type.mdx#L34

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/service_type.mdx", "range": {"start": {"line": 34, "column": 23}}}, "severity": "INFO"}

```typescript
const client = new ServiceB(ctx);
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const config = {
items: [
{
href: "/services/sdk/overview?sdk=ts",
label: "Typescript SDK",
label: "TypeScript SDK",
position: "right",
},
{
Expand Down

0 comments on commit 7d4c790

Please sign in to comment.