MCPcopy Create free account
hub / github.com/microsoft/typescript-go / popTypeResolution

Method popTypeResolution

internal/checker/checker.go:18680–18686  ·  view source on GitHub ↗

** * Pop an entry from the type resolution stack and return its associated result value. The result value will * be true if no circularities were detected, or false if a circularity was found. */

()

Source from the content-addressed store, hash-verified

18678 * be true if no circularities were detected, or false if a circularity was found.
18679 */
18680func (c *Checker) popTypeResolution() bool {
18681 lastIndex := len(c.typeResolutions) - 1
18682 result := c.typeResolutions[lastIndex].result
18683 c.typeResolutions[lastIndex] = TypeResolution{} // Clear the last entry to avoid memory leaks
18684 c.typeResolutions = c.typeResolutions[:lastIndex]
18685 return result
18686}
18687
18688func (c *Checker) findResolutionCycleStartIndex(target TypeSystemEntity, propertyName TypeSystemPropertyName) int {
18689 for i := len(c.typeResolutions) - 1; i >= c.resolutionStart; i-- {

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected