Skip to content

Text

@tsed/mongoose

Usage

typescript
import { Text } from "@tsed/mongoose";

See /packages/orm/mongoose/src/types/decorators/text.ts.

Overview

ts
function Text(text?: boolean | number | any): PropertyDecorator;

Description

If truthy, Mongoose will build a text index on this path.

Example

typescript
@Model()
export class EventModel {
  @Text()
  field: string;
}

Released under the MIT License.