ts: export error types (#1756)

This commit is contained in:
Krešimir Klas 2022-04-11 17:25:59 +02:00 committed by GitHub
parent 3dc5940149
commit 12f6541486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ The minor version will be incremented upon a breaking change and the patch versi
* cli: Update js/ts templates to use new `program.methods` syntax ([#1732](https://github.com/project-serum/anchor/pull/1732)).
* cli: Workspaces created with `anchor init` now come with the `prettier` formatter and scripts included ([#1741](https://github.com/project-serum/anchor/pull/1741)).
* ts: Add `pubkeys` function to methods builder to get all instruction account addresses ([#1733](https://github.com/project-serum/anchor/pull/1733)).
* ts: Export `LangErrorCode` and `LangErrorMessage` from `error.ts` ([#1756](https://github.com/project-serum/anchor/pull/1756)).
### Fixes

View File

@ -305,7 +305,7 @@ export function translateError(err: any, idlErrors: Map<number, string>) {
return err;
}
const LangErrorCode = {
export const LangErrorCode = {
// Instructions.
InstructionMissing: 100,
InstructionFallbackNotFound: 101,
@ -374,7 +374,7 @@ const LangErrorCode = {
Deprecated: 5000,
};
const LangErrorMessage = new Map([
export const LangErrorMessage = new Map([
// Instructions.
[
LangErrorCode.InstructionMissing,