New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@superfaceai/map-std

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superfaceai/map-std

Types for development against the OneSDK map standard library.

  • 0.1.0-alpha.2
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

Website | Get Started | Documentation | GitHub Discussions | Twitter | Support

Superface

Superface OneSDK Map standard library

Types for development against the OneSDK map standard library.

Setup

To setup an environment for language support when developing tools:

npm install @superfaceai/map-std

To define a usecase define a new type in a TypeScript example.profile.ts file:

/// <reference types="@superface/map-std" />

type Example = Usecase<{
  safety: 'safe'
  input: {
	/** Id of the thing to fetch. */
	id: AnyValue
  }
  result: { name: string }
  error: { title: AnyValue, detail?: AnyValue }
}>;

Then develop a map with type support:

/// <reference types="@superface/map-std" />
/// <reference path="./example.profile.ts" />
// @ts-check

/** @type {Example} */
var Example = ({ input, parameters, services }) => {
	return { name: "hardcoded example" }
}

For more examples see examples in OneSDK repository.

License

OneSDK is licensed under the MIT License.

© 2023 Superface s.r.o.

FAQs

Package last updated on 23 Nov 2023

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