# parseImportMap() function · @imqueue/pg-prisma

Source: https://imqueue.org/api/pg-prisma/latest/pg-prisma.parseimportmap/
Published: 2026-08-28
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-prisma 2.0.0 — generated reference, not hand-written

Read an import map from its generator-option spelling.

**Signature:**

```typescript
export declare function parseImportMap(spec?: string): ImportMap;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| spec | string | _(Optional)_ The option value, or undefined for no redirection. |


**Returns:**

[ImportMap](https://imqueue.org/api/pg-prisma/latest/pg-prisma.importmap/)

The parsed map.

## Exceptions

When an entry is malformed or names an unknown specifier.

## Remarks

`"zod=@my-org/runtime, @imqueue/rpc=@my-org/runtime"`. An entry naming a specifier this package never emits is a throw rather than a no-op: silently ignoring it would leave the consumer believing a redirection had been applied when the generated files still point at the original.

## Example


```typescript
parseImportMap('zod=@my-org/runtime');
// { zod: '@my-org/runtime' }
```

