Skip to main content

NewScope

Creates a new scope in the format name + defaultScopeDelimiterRune. If the last character is already a defaultScopeDelimiterRune, then it does not add it to the scope name.

def NewScope(
name: string
) - > Scope

Creates a new scope in the format name + defaultScopeDelimiterRune. If the last character is already a defaultScopeDelimiterRune, then it does not add it to the scope name.

Parameters​

NameTypeDescription
namestringThe base name for the new scope. This cannot be an empty string.

Returns​

TypeDescription
ScopeA new Scope object with the sanitized name.