preferSchemaTypeProperty
August 4, 2026 ยท View on GitHub
Disallows Schema.Schema.Type
| Property | Value |
|---|---|
| Category | Style |
| Default severity | off |
| Fixable | Yes |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377104 |
| Language Service name | preferSchemaTypeProperty |
| Oxlint name | effecttsgo/prefer-schema-type-property |
Preview
import { Schema } from "effect"
const User = Schema.Struct({ name: Schema.String })
type User = Schema.Schema.Type<typeof User>
/**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(prefer-schema-type-property): Do not use `Schema.Schema.Type<typeof X>` to extract a schema's type. Use `typeof X.Type` instead.
*/
Language Service Configuration
See the Language Service setup guide for installation instructions.
{
"$schema": "./node_modules/@effect/tsgo/schema.json",
"compilerOptions": {
"plugins": [
{
"name": "@effect/language-service",
"diagnosticSeverity": {
"preferSchemaTypeProperty": "warning"
}
}
]
}
}
Oxlint Configuration
See the Oxlint setup guide for installation and patching instructions.
{
"$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
"options": {
"typeAware": true
},
"plugins": ["effecttsgo"],
"rules": {
"effecttsgo/prefer-schema-type-property": "warn"
}
}