Skip to content

Commit 8764e1f

Browse files
committed
update to use T type
1 parent 42a1535 commit 8764e1f

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/api.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ export interface PythonProject {
660660
/**
661661
* Options for creating a Python project.
662662
*/
663-
export interface PythonProjectCreatorOptions {
663+
export interface PythonProjectCreatorOptions<T extends PythonProjectCustomization = PythonProjectCustomization> {
664664
/**
665665
* The name of the Python project.
666666
*/
@@ -671,14 +671,16 @@ export interface PythonProjectCreatorOptions {
671671
*/
672672
rootUri: Uri;
673673

674-
projectTemplateSpecifications?: PythonProjectTemplateSpecifications;
674+
/**
675+
* The customization options for the Python project.
676+
*/
677+
customization?: T;
675678
}
676679

677680
/**
678-
* Specifications for the template set by the Python project creator. Project creators can create an object
679-
* extending this type to provide additional information about what their template need.
681+
* This is an interface allowing project creators to specify customization options required for the project creation.
680682
*/
681-
export interface PythonProjectTemplateSpecifications {}
683+
export interface PythonProjectCustomization {}
682684

683685
/**
684686
* Interface representing a creator for Python projects.

src/internal.api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
QuickCreateConfig,
2828
CreateEnvironmentOptions,
2929
PythonProjectTemplateSpecifications,
30+
PythonProjectCustomization,
3031
} from './api';
3132
import { CreateEnvironmentNotSupported, RemoveEnvironmentNotSupported } from './common/errors/NotSupportedError';
3233
import { sendTelemetryEvent } from './common/telemetry/sender';
@@ -373,6 +374,6 @@ export interface ProjectCreators extends Disposable {
373374
getProjectCreators(): PythonProjectCreator[];
374375
}
375376

376-
export interface PackageTemplateSpecifications extends PythonProjectTemplateSpecifications {
377+
export interface PackageTemplateSpecifications extends PythonProjectCustomization {
377378
createVenv?: boolean;
378379
}

0 commit comments

Comments
 (0)