1 | import { getSiName } from '../metadata/util/index.js';
|
2 | /** @internal */
|
3 | export function unwrapStorageSi(type) {
|
4 | return type.isPlain
|
5 | ? type.asPlain
|
6 | : type.asMap.value;
|
7 | }
|
8 | /** @internal */
|
9 | export function unwrapStorageType(registry, type, isOptional) {
|
10 | const outputType = getSiName(registry.lookup, unwrapStorageSi(type));
|
11 | return isOptional
|
12 | ? `Option<${outputType}>`
|
13 | : outputType;
|
14 | }
|