Suite of AT Protocol TypeScript libraries built on web standards
21
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix lint issues

+10 -11
+2 -2
lex-gen/builder/def-builder.ts
··· 348 348 type: `{ ${properties.join(";")} }`, 349 349 schemaType: (ref) => 350 350 `l.TypedObjectSchema<l.$TypeOf<${ref.typeName}>, l.Validator<Omit<${ref.typeName}, "$type">>>`, 351 - schema: async (ref) => 351 + schema: (ref) => 352 352 this.pure( 353 353 `l.typedObject<${ref.typeName}>($nsid, ${ 354 354 JSON.stringify(hash) ··· 391 391 validationUtils, 392 392 }: { 393 393 type?: string | ((ref: ResolvedRef) => string); 394 - schema?: string | ((ref: ResolvedRef) => Promise<string>); 394 + schema?: string | ((ref: ResolvedRef) => Promise<string> | string); 395 395 schemaType?: string | ((ref: ResolvedRef) => string); 396 396 objectUtils?: boolean; 397 397 validationUtils?: boolean;
+1 -1
lex-gen/tests/method-generation_test.ts
··· 14 14 this.#docs = new Map(docs.map((doc) => [doc.id, doc])); 15 15 } 16 16 17 - async get(id: string): Promise<LexiconDocument> { 17 + get(id: string): LexiconDocument { 18 18 const doc = this.#docs.get(id); 19 19 if (!doc) { 20 20 throw new Error(`Document not found: ${id}`);
+5 -7
lex/document/indexer.ts
··· 1 1 import type { LexiconDocument } from "./lexicon.ts"; 2 2 3 3 export interface LexiconIndexer { 4 - get(nsid: string): Promise<LexiconDocument>; 4 + get(nsid: string): Promise<LexiconDocument> | LexiconDocument; 5 5 [Symbol.asyncDispose]?: () => Promise<void>; 6 6 [Symbol.asyncIterator]?: () => AsyncIterator<LexiconDocument, void, unknown>; 7 7 } 8 8 9 - export class LexiconIterableIndexer 10 - implements LexiconIndexer, AsyncDisposable { 9 + export class LexiconIterableIndexer implements LexiconIndexer, AsyncDisposable { 11 10 readonly #lexicons: Map<string, LexiconDocument> = new Map(); 12 11 readonly #iterator: 13 12 | AsyncIterator<LexiconDocument, void, unknown> ··· 18 17 | AsyncIterable<LexiconDocument> 19 18 | Iterable<LexiconDocument>, 20 19 ) { 21 - this.#iterator = 22 - Symbol.asyncIterator in source 23 - ? source[Symbol.asyncIterator]() 24 - : source[Symbol.iterator](); 20 + this.#iterator = Symbol.asyncIterator in source 21 + ? source[Symbol.asyncIterator]() 22 + : source[Symbol.iterator](); 25 23 } 26 24 27 25 async get(id: string): Promise<LexiconDocument> {
+2 -1
xrpc/client.ts
··· 20 20 httpResponseBodyParse, 21 21 isErrorResponseBody, 22 22 } from "./util.ts"; 23 + import type { DidString } from "../lex/core/string-format.ts"; 23 24 24 25 type XrpcMethod = Query | Procedure; 25 26 ··· 38 39 this.fetchHandler = this.agent.fetchHandler; 39 40 } 40 41 41 - get did() { 42 + get did(): DidString | undefined { 42 43 return this.agent.did; 43 44 } 44 45