Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/decorators

Package Overview
Dependencies
Maintainers
0
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/decorators

A very conservative set of decorators for TypeScript projects

  • 1.20.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
9K
decreased by-2.82%
Maintainers
0
Weekly downloads
 
Created
Source

decorators

This package defines a conservative set of decorators intended for use in both NodeJS and web browser projects. We recognize that decorators have certain risks:

  • They can inject hidden code at runtime, causing confusion for developers who expected the source code to follow conventional semantics

  • They can be difficult to debug, since decorators are evaluated at load time (versus compile time or run time)

  • They can affect API contracts in subtle ways, which may cause unforeseen breaks for runtime versioning (e.g. when loading a subclass that was compiled against an older version of a base class with decorators)

  • The decorator spec is still evolving, and there may be breaking changes in the future

In this light, the @microsoft/decorators package provides a small set of decorators that stay within the conventional semantics of the TypeScript language. The intent is to document API contracts more clearly and catch common mistakes, NOT to provide an open-ended toolkit of creative macros. (If you are looking for that, there are many other options, for example the core-decorators project.)

This package is part of the SharePoint Framework, which is a collection of NPM packages that empower developers to create client-side experiences for Microsoft SharePoint. For more information, including complete API documentation and code samples, please visit the SharePoint Framework web site.

FAQs

Package last updated on 26 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc