MCPcopy Create free account
hub / github.com/CashScript/cashscript / fromString

Method fromString

packages/utils/src/types.ts:19–22  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

17 ) { }
18
19 static fromString(str: string): BytesType {
20 const bound = str === 'byte' ? 1 : Number.parseInt(str.substring(5), 10) || undefined;
21 return new BytesType(bound);
22 }
23
24 toString(): string {
25 return `bytes${this.bound ?? ''}`;

Callers 1

parseTypeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected