mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #24162 from nickw444/nwhyte/prismic-dom
prismic-dom: Add initial typings
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// Type definitions for prismic-dom 2.0
|
||||
// Project: https://github.com/prismicio/prismic-dom#readme
|
||||
// Definitions by: Nick Whyte <https://github.com/nickw444>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface RichText {
|
||||
asHtml(richText: any, linkResolver?: (doc: any) => string): string;
|
||||
}
|
||||
|
||||
export const RichText: RichText;
|
||||
|
||||
declare const _default: { RichText: RichText };
|
||||
export default _default;
|
||||
@@ -0,0 +1,3 @@
|
||||
import prismicDom = require("prismic-dom");
|
||||
|
||||
const rendered: string = prismicDom.RichText.asHtml({});
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"prismic-dom-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user