Skip to content

Commit 88a91a3

Browse files
author
Akos Kitta
committed
Doc for the port address enhancer.
Signed-off-by: Akos Kitta <[email protected]>
1 parent a7284f9 commit 88a91a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arduino-ide-extension/src/node/board-discovery.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,11 @@ export function maybeEnhancePortAddress(
389389
return detectedPort;
390390
}
391391

392-
const PortAddressEnhancers = [enhanceESP32_S2];
392+
/**
393+
* Must return with `undefined` if the `arg` cannot be enhanced.
394+
*/
395+
type PortAddressEnhancer = (arg: DetectedPort) => DetectedPort | undefined;
396+
const PortAddressEnhancers: PortAddressEnhancer[] = [enhanceESP32_S2];
393397

394398
function enhanceESP32_S2(detectedPort: DetectedPort): DetectedPort | undefined {
395399
if (DetectedPort.isUnrecognizedNetwork(detectedPort)) {

0 commit comments

Comments
 (0)