Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library

sp-core-library package

SharePoint Framework core libraries.

Remarks

This package provides a foundation of core classes that ensure a consistent character across all the other SharePoint Framework APIs. Because this package is a dependency of every other package, its design prioritizes small code size and broad applicability, versus flexibility or richness of features.

Classes

Class Description
Environment Information about the system environment where the SharePoint Framework is running.
Guid This class represents a globally unique identifier, as described by IETF RFC 4122.
Log A basic redirectable logging system.
RandomNumberGenerator This is the default implementation of IRandomNumberGenerator that simply calls Math.random().
ServiceKey The ServiceKey is a lookup key that is used when calling ServiceScope.consume() to fetch a dependency.
ServiceScope The service locator pattern used by the SharePoint Framework.
Session Provides access to the application's browser session and active page.
SPEvent Represents a framework event that components can subscribe to.
SPEventArgs The base class for event arguments used with the SPEvent class.
Text_2 Operations for working with strings that contain text.
TimeProvider This is the default implementation of ITimeProvider that simply calls the real browser APIs.
UrlQueryParameterCollection Provides features for storing and retrieving URL query parameters.
Validate Performs common validation tests for properties and function parameters.
Version Represents a version number with two, three, or four parts.

Enumerations

Enumeration Description
DisplayMode Indicates whether a visual control should display itself for reading or for editing.
EnvironmentType Indicates the general type of environment where the SharePoint Framework is running.

Interfaces

Interface Description
IDisposable Implemented by an object that supports a disposal lifecycle.
IRandomNumberGenerator This is a ServiceScope contract for generating pseudorandom random numbers.
IServiceCollection A shorthand pattern for extracting well-known services from a ServiceScope.
ISPEventObserver Used with the SPEvent system, this interface is implemented by components that can subscribe to events.
ITimeProvider This is a ServiceScope contract for reading the system clock.

Type Aliases

Type Alias Description
ServiceCreator This is a callback that is used by ServiceKey.createCustom().
Clone this wiki locally