microsoft / microsoft/typespec

Compile time variables

Open
#2,916 4 comments 1 reaction 0 assignees View on GitHub
design:needed triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

### Discussed in https://github.com/microsoft/typespec/discussions/2915

Originally posted by **laduke** February 14, 2024
I for example, want to pass a version into my service definition

```
@service({
title: "My Service",
version: {VersionFromSomewhere},
})
```

I can get the value into an env var, a cli flag, even a .js file, but I haven't been able to figure out how to import/ interpolate it into the tsp file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.