Notably, this gets us `@actions/github` 6.0.1, which is necessary for `github.context.runAttempt` (so I have also updated `package.json` accordingly). On that note... great job following semver, GitHub! Between this and the non-breaking major version change on `@actions/cache`, I'm starting to feel like nobody on the Actions team understands how software versioning works.
61 lines
2.6 KiB
TypeScript
61 lines
2.6 KiB
TypeScript
import { GeneratedFile } from "./generated-file";
|
|
import { DescEnum, DescMessage, DescService } from "@bufbuild/protobuf";
|
|
/**
|
|
* A table for unique symbols (for any DescriptorProto, EnumDescriptorProto
|
|
* or ServiceDescriptorProto) in files (GeneratedFile).
|
|
*/
|
|
export declare class SymbolTable {
|
|
private readonly entries;
|
|
private readonly clashResolveMaxTries;
|
|
private readonly clashResolver;
|
|
constructor(clashResolver?: ClashResolver);
|
|
/**
|
|
* Register a symbol in the given file for the given descriptor.
|
|
*
|
|
* If the name is already taken in the file, an alternative name
|
|
* is automatically generated by appending '$' and a running
|
|
* number to the requested name. You can change the behaviour by
|
|
* providing your own `clashResolver`.
|
|
*
|
|
* Only one symbol per kind can be registered for a descriptor.
|
|
*
|
|
* If you want to generate an interface *and* a class for a
|
|
* message, use a different `kind` for each.
|
|
*
|
|
* Returns the actual name registered.
|
|
*/
|
|
register(requestedName: string, descType: DescMessage | DescEnum | DescService, file: GeneratedFile, kind?: string): string;
|
|
/**
|
|
* Find a symbol (of the given kind) for the given descriptor.
|
|
* Return `undefined` if not found.
|
|
*/
|
|
find(descType: DescMessage | DescEnum | DescService, kind?: string): SymbolTableEntry | undefined;
|
|
/**
|
|
* Find a symbol (of the given kind) for the given descriptor.
|
|
* Raises error if not found.
|
|
*/
|
|
get(descType: DescMessage | DescEnum | DescService, kind?: string): SymbolTableEntry;
|
|
/**
|
|
* Is a name (of the given kind) registered for the the given descriptor?
|
|
*/
|
|
has(descType: DescMessage | DescEnum | DescService, kind?: string): boolean;
|
|
/**
|
|
* List all names of any kind registered in the given file.
|
|
*/
|
|
list(file: GeneratedFile): SymbolTableEntry[];
|
|
/**
|
|
* List all names of the given kind registered in the given file.
|
|
*/
|
|
list(file: GeneratedFile, kind: string): SymbolTableEntry[];
|
|
protected hasNameInFile: (name: string, file: GeneratedFile) => boolean;
|
|
static defaultClashResolver(descriptor: DescMessage | DescEnum | DescService, file: GeneratedFile, requestedName: string, kind: string, tryCount: number): string;
|
|
}
|
|
interface SymbolTableEntry {
|
|
file: GeneratedFile;
|
|
descriptor: DescMessage | DescEnum | DescService;
|
|
name: string;
|
|
kind: string;
|
|
}
|
|
declare type ClashResolver = (descriptor: DescMessage | DescEnum | DescService, file: GeneratedFile, requestedName: string, kind: string, tryCount: number, failedName: string) => string;
|
|
export {};
|