feat(build): auto-rebuild/check TypeScript types for packages/plugins in webpack (#35240)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Maxime Beauchemin
2025-09-23 19:22:59 -07:00
committed by GitHub
parent b6f6b75348
commit 608e3baf43
3 changed files with 85 additions and 14 deletions

View File

@@ -16,7 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
export { savedMetricType } from './types';
import PropTypes from 'prop-types';
// For backward compatibility with PropTypes usage
export { savedMetricType as default } from './types';
export type { savedMetricType } from './types';
// PropTypes definition for JavaScript files
const savedMetricTypePropTypes = PropTypes.shape({
metric_name: PropTypes.string.isRequired,
verbose_name: PropTypes.string,
expression: PropTypes.string,
});
// Export as default for backward compatibility with JavaScript files
export default savedMetricTypePropTypes;