Skip to content

Commit 06964ff

Browse files
Couple edits
1 parent 59d5786 commit 06964ff

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

blog/2025-02-14-typescript-sdk-release.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This release is a big step forward, significantly improving the type safety of o
1111
- Lexicon derived interfaces now have an explicitly defined `$type` property, allowing to properly discriminate unions.
1212
- Lexicon derived `is*` utility methods no longer unsafely type cast their input.
1313
- Lexicon derived `validate*` utility methods now return a more precise type.
14-
- New Lexicon derived `isValid*` utility methods are now available.
1514

1615
## Context
1716

@@ -148,7 +147,7 @@ export interface Main {
148147
}
149148
```
150149

151-
Notice how the `$type` property is defined as optional (`?:`) here. This is due to the fact that lexicons can define schemas that can be referenced from other places than open unions. In those places, there might not be any ambiguity as to how the data should be interpreted. For example, an embed that represents a "Record With Media" has a `record` property that expects an `app.bsky.embed.record` object:
150+
Notice how the `$type` property is defined as optional (`?:`) here. This is due to the fact that lexicons can define schemas that can be referenced in places other than open unions. In those places, there might not be any ambiguity as to how the data should be interpreted. For example, an embed that represents a "Record With Media" has a `record` property that expects an `app.bsky.embed.record` object:
152151

153152
```typescript
154153
export interface Main {
@@ -278,7 +277,7 @@ In many cases where data needs to be discriminated, this change in the signature
278277

279278
:::
280279

281-
For example, this is the case when working with data obtained from the API. Because an API is a "contract" between a server and a client, the data returned by the server is "guaranteed" to be valid. In these cases, the `is*` utility methods provide a convenient way to discriminate between valid values.
280+
For example, this is the case when working with data obtained from the API. Because an API is a "contract" between a server and a client, **the data returned by Bluesky's server APIs is "guaranteed" to be valid.** In these cases, the `is*` utility methods provide a convenient way to discriminate between valid values.
282281

283282
```typescript
284283
import { AppBskyEmbedImages } from '@atproto/api'

0 commit comments

Comments
 (0)