Skip to content

Generating ArkType: Unterminated string literal #67

@Manuelbaun

Description

@Manuelbaun

This simple type throws the Syntax Error below.

// This does not work:
type Test = {
    ids: {
        status: string;
    }[];
}

// This works
type IDStatus = {
    status: string;
}

type Test = {
    ids: IDStatus[];
}
SyntaxError: Unterminated string literal. (5:13) (at index.js:123:23081)
  3 | export const types = scope({
  4 | Test: type({
> 5 | ids: 'type({
    |             ^
  6 | status: 'string',name: 'string'
  7 | })[]'
  8 | }),
    at Qt (index.js:123:23081)
    at QQ (index.js:171:10937)
    at Object.sH [as parse] (index.js:171:11260)
    at Object.Wt [as parse] (index.js:47:1426)
    at Cn (index.js:48:16553)
    at _n (index.js:52:643)
    at index.js:123:7751
    at Object.format (index.js:123:7846)
    at Object.s [as Format] (index.js:581:20087)
    at Object.co [as Generate] (index.js:644:268)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions