# msg-convertor **Repository Path**: passerjia02/msg-convertor ## Basic Information - **Project Name**: msg-convertor - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-15 - **Last Updated**: 2025-09-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mySceneUpdateConverter [Foxglove](https://foxglove.dev) allows developers to create [extensions](https://docs.foxglove.dev/docs/visualization/extensions/introduction), or custom code that is loaded and executed inside the Foxglove application. This can be used to add custom panels. Extensions are authored in TypeScript using the `@foxglove/extension` SDK. ## Develop Extension development uses the `npm` package manager to install development dependencies and run build scripts. To install extension dependencies, run `npm` from the root of the extension package. ```sh npm install ``` To build and install the extension into your local Foxglove desktop app, run: ```sh npm run local-install ``` Open the Foxglove desktop (or `ctrl-R` to refresh if it is already open). Your extension is installed and available within the app. ## Package Extensions are packaged into `.foxe` files. These files contain the metadata (package.json) and the build code for the extension. Before packaging, make sure to set `name`, `publisher`, `version`, and `description` fields in _package.json_. When ready to distribute the extension, run: ```sh npm run package ``` This command will package the extension into a `.foxe` file in the local directory. ## Publish You can publish the extension to the public registry or privately for your organization. See documentation here: https://docs.foxglove.dev/docs/visualization/extensions/publish/#packaging-your-extension ## typescript `var`: 函数作用域 (function-scoped) 在函数内部声明的变量只能在函数内部访问, 在块语句(如 if、for)中声明的变量会提升到函数作用域 `let` 和 `const`: 块级作用域 (block-scoped) 只在声明它们的块({})内有效不会提升到函数作用域 - 最佳实践总结 1. 默认使用 `const` - 除非需要重新赋值 2. 需要重新赋值时用 `let` - 替代 var 3. 避免使用 `var` - 除非有特殊需求(如需要函数作用域) 4. 优先使用块级作用域 - 更安全、更可预测的行为