Skip to content

Commit 484afbe

Browse files
committed
add _SCRIPT_SUBNAME to env.d.ts and deprecate _SCRIPT_NAME
1 parent 071fa2b commit 484afbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

env.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,14 +1046,17 @@ declare global {
10461046
* In rare cases where it's not known at build time, it's `"UNKNOWN"`. */
10471047
const _SCRIPT_USER: string
10481048

1049+
/** @deprecated Use `_SCRIPT_SUBNAME` instead. */
1050+
const _SCRIPT_NAME: string
1051+
10491052
/** The name of this script excluding the user and `.`.
10501053
*
10511054
* e.g. in the script `foo.bar`, `_SCRIPT_NAME` is `bar`.
10521055
*
10531056
* Shorter alternative to `context.this_script.split(".")[1].
10541057
*
10551058
* In rare cases where it's not known at build time, it's `"UNKNOWN"`. */
1056-
const _SCRIPT_NAME: string
1059+
const _SCRIPT_SUBNAME: string
10571060

10581061
/** The full name of this script equivilent to `context.this_script` but should use less characters.
10591062
*

0 commit comments

Comments
 (0)