Skip to content

Commit

Permalink
Update index.ts.template
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy authored Sep 30, 2023
1 parent 9b16a72 commit e5529e2
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions packages/pulumi/src/generators/init/files/index.ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,3 @@ register({

import './pulumi'
export * from './pulumi'

import * as pulumi from '@pulumi/pulumi';

type ExportTypes = typeof import('./pulumi');
type ExportTypesKey = keyof ExportTypes;
type ExportTypesValue<TKey extends ExportTypesKey> = ExportTypes[TKey];

type StrongTypedStackReference = Omit<pulumi.StackReference, 'getOutput' | 'requireOutput'> & {
getOutput<T extends ExportTypesKey>(name: pulumi.Input<T>): ExportTypesValue<T>;
requireOutput<T extends ExportTypesKey>(name: pulumi.Input<T>): ExportTypesValue<T>;
};

export function getStackReference() {
const stack = pulumi.getStack();
return new pulumi.StackReference(`organization/<%= name %>/${stack}`) as StrongTypedStackReference;
}

0 comments on commit e5529e2

Please sign in to comment.