Files
SnowLuma/.pnpm-store/v11/files/29/ac5b4bdf43da741595d6891ff50a91eb1d735fdfb69890d6a61d5478df599dce9c37fe8aafc78cae366c6e4e038aa0780de6dd40a7e3ea14ffb64149a758a5
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

39 lines
1.3 KiB
Plaintext

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
'use strict';
/**
*
* IMPORTANT NOTE
*
* This file intentionally uses interfaces and `+` for readonly.
*
* - `$ReadOnly` is an "evaluated" utility type in flow; meaning that flow does
* not actually calculate the resulting type until it is used. This creates
* a copy of the type at each usage site - ballooning memory and processing
* times.
* Usually this isn't a problem as a type might only be used one or two times
* - but in this giant circular-referencing graph that is the AST types, this
* causes check times for consumers to be awful.
*
* Thus instead we manually annotate properties with `+` to avoid the `$ReadOnly` type.
*
* - `...Type` spreads do not preserve the readonly-ness of the properties. If
* we used object literal types then we would have to `$ReadOnly` all spreads
* (see point 1). On the other hand extending an interface does preserve
* readonlyness of properties.
*
* Thus instead of object literals, we use interfaces.
*
*** Please ensure all properties are marked as readonly! ***
*/
Object.defineProperty(exports, "__esModule", {
value: true
});