@@ -596,11 +596,11 @@ export interface IJupyterKernelSpec {
596596 * @type {string }
597597 * @memberof IJupyterKernel
598598 */
599- id ?: string ;
600- name : string ;
601- language ?: string ;
602- executable : string ; // argv[0] of the kernelspec.json
603- env ?: NodeJS . ProcessEnv | undefined ;
599+ readonly id ?: string ;
600+ readonly name : string ;
601+ readonly language ?: string ;
602+ readonly executable : string ; // argv[0] of the kernelspec.json
603+ readonly env ?: Readonly < NodeJS . ProcessEnv > | undefined ;
604604 /**
605605 * Kernel display name.
606606 *
@@ -612,45 +612,47 @@ export interface IJupyterKernelSpec {
612612 * A dictionary of additional attributes about this kernel; used by clients to aid in kernel selection.
613613 * Optionally storing the interpreter information in the metadata (helping extension search for kernels that match an interpereter).
614614 */
615- // eslint-disable-next-line @typescript-eslint/no-explicit-any
616- readonly metadata ?: Record < string , any > & {
617- vscode ?: {
615+ readonly metadata ?: Readonly <
616+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
617+ Record < string , any > & {
618+ vscode ?: {
619+ /**
620+ * Optionally where the original user-created kernel spec json is located on the local FS.
621+ * Remember when using non-raw we create kernelspecs from the original spec.
622+ */
623+ originalSpecFile ?: string ;
624+ /**
625+ * E.g. assume we're loading a kernlespec for a default Python kernel, the name would be `python3`
626+ * However we give this a completely different name, and at that point its not possible to determine
627+ * whether this is a default kernel or not.
628+ * Hence keep track of the original name in the metadata.
629+ */
630+ originalDisplayName ?: string ;
631+ } ;
632+ interpreter ?: Partial < PythonEnvironment_PythonApi > ; // read from disk so has to follow old format
618633 /**
619- * Optionally where the original user-created kernel spec json is located on the local FS.
620- * Remember when using non-raw we create kernelspecs from the original spec.
634+ * @deprecated (use metadata.jupyter.originalSpecFile)
621635 */
622636 originalSpecFile ?: string ;
623637 /**
624- * E.g. assume we're loading a kernlespec for a default Python kernel, the name would be `python3`
625- * However we give this a completely different name, and at that point its not possible to determine
626- * whether this is a default kernel or not.
627- * Hence keep track of the original name in the metadata.
638+ * Whether the kernels supports the debugger Protocol.
628639 */
629- originalDisplayName ?: string ;
630- } ;
631- interpreter ?: Partial < PythonEnvironment_PythonApi > ; // read from disk so has to follow old format
632- /**
633- * @deprecated (use metadata.jupyter.originalSpecFile)
634- */
635- originalSpecFile ?: string ;
636- /**
637- * Whether the kernels supports the debugger Protocol.
638- */
639- debugger ?: boolean ;
640- } ;
640+ debugger ?: boolean ;
641+ }
642+ > ;
641643 readonly argv : string [ ] ;
642644 /**
643645 * Optionally where this kernel spec json is located on the local FS.
644646 */
645- specFile ?: string ;
647+ readonly specFile ?: string ;
646648 /**
647649 * Optionally the Interpreter this kernel spec belongs to.
648650 * You can have kernel specs that are scoped to an interpreter.
649651 * E.g. if you have Python in `c:\Python\Python3.8`
650652 * Then you could have kernels in `<sys.prefix folder for this interpreter>\share\jupyter\kernels`
651653 * Plenty of conda packages ship kernels in this manner (beakerx, etc).
652654 */
653- interpreterPath ?: string ; // Has to be a string as old kernelspecs wrote it this way
655+ readonly interpreterPath ?: string ; // Has to be a string as old kernelspecs wrote it this way
654656 readonly interrupt_mode ?: 'message' | 'signal' ;
655657 /**
656658 * Whether the kernelspec is registered by VS Code
0 commit comments