mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 06:40:35 +08:00
prismic-dom: Add initial typings
This commit is contained in:
8
types/prismic-dom/index.d.ts
vendored
Normal file
8
types/prismic-dom/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// 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
|
||||
|
||||
export class RichText {
|
||||
static asHtml(richText: any, linkResolver?: (doc: any) => string): string;
|
||||
}
|
||||
3
types/prismic-dom/prismic-dom-tests.ts
Normal file
3
types/prismic-dom/prismic-dom-tests.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import prismicDom = require("prismic-dom");
|
||||
|
||||
let rendered: string = prismicDom.RichText.asHtml({});
|
||||
22
types/prismic-dom/tsconfig.json
Normal file
22
types/prismic-dom/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"prismic-dom-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/prismic-dom/tslint.json
Normal file
1
types/prismic-dom/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user