This commit allows for parameters that does not require any arguments to be provided in function calls. It changes collection syntax where parameters are list of objects instead of primitive strings. A parameter has now 'name' and 'optional' properties. 'name' is required and used in same way as older strings as parameter definitions. 'Optional' property is optional, 'false' is the default behavior if undefined. It also adds additional validation to restrict parameter names to alphanumeric strings to have a clear syntax in expressions.
10 lines
318 B
TypeScript
10 lines
318 B
TypeScript
import { IFunctionParameter } from './IFunctionParameter';
|
|
|
|
export interface IReadOnlyFunctionParameterCollection {
|
|
readonly all: readonly IFunctionParameter[];
|
|
}
|
|
|
|
export interface IFunctionParameterCollection extends IReadOnlyFunctionParameterCollection {
|
|
addParameter(parameter: IFunctionParameter): void;
|
|
}
|