MCPcopy Create free account
hub / github.com/2fd/graphdoc / deprecatedLength

Method deprecatedLength

plugins/document.schema/index.ts:182–192  ·  view source on GitHub ↗
(fieldOrEnumVal: Field | EnumValue)

Source from the content-addressed store, hash-verified

180 }
181
182 deprecatedLength(fieldOrEnumVal: Field | EnumValue): number {
183
184 if (!fieldOrEnumVal.isDeprecated)
185 return 0;
186
187 if (!fieldOrEnumVal.deprecationReason) {
188 return '@deprecated'.length;
189 }
190
191 return '@deprecated( reason: "'.length + fieldOrEnumVal.deprecationReason.length + '" )'.length;
192 }
193
194 description(description: string): string[] {
195

Callers 1

fieldLengthMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected