Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
Property.test.ts1.25 kB
import { expect, test } from 'vitest' import { docComment } from './DocComment' import { namedType } from './NamedType' import { property } from './Property' import { stringify } from './stringify' import { toStringTag } from './WellKnownSymbol' const A = namedType('A') test('name and type', () => { const prop = property('foo', A) expect(stringify(prop)).toMatchInlineSnapshot(`"foo: A"`) }) test('invalid identifier', () => { const prop = property('this is not a valid JS identifier', A) expect(stringify(prop)).toMatchInlineSnapshot(`"["this is not a valid JS identifier"]: A"`) }) test('well-known symbol', () => { const prop = property(toStringTag, A) expect(stringify(prop)).toMatchInlineSnapshot(`"[Symbol.toStringTag]: A"`) }) test('optional', () => { const prop = property('foo', A).optional() expect(stringify(prop)).toMatchInlineSnapshot(`"foo?: A"`) }) test('readonly', () => { const prop = property('foo', A).readonly() expect(stringify(prop)).toMatchInlineSnapshot(`"readonly foo: A"`) }) test('with doc comment', () => { const prop = property('foo', A).setDocComment(docComment('This is foo')) expect(stringify(prop)).toMatchInlineSnapshot(` "/** * This is foo */ foo: A" `) })

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server