We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbd569e commit 58f1c72Copy full SHA for 58f1c72
docs/dtos/typing-properties.md
@@ -252,3 +252,28 @@ Now all properties will be optional:
252
name? : string;
253
}
254
```
255
+
256
+## Hidden types
257
258
+You can make certain properties of a DTO hidden in TypeScript as such:
259
260
+```php
261
+class DataObject extends Data
262
+{
263
+ public function __construct(
264
+ public int $id,
265
+ #[Hidden]
266
+ public string $hidden,
267
+ )
268
+ {
269
+ }
270
+}
271
+```
272
273
+This will be transformed into:
274
275
+```tsx
276
277
+ id : number;
278
279
0 commit comments