Skip to content

Commit

Permalink
Merge pull request #181 from Eyas/ts-peer
Browse files Browse the repository at this point in the history
Remove TypeScript as an explicit peer dependency.
  • Loading branch information
Eyas authored Feb 27, 2023
2 parents f83949b + 8e0db44 commit dea38ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You will usually want your top-level item to include a `@context`, like
can augment it with `WithContext`, e.g.:

```ts
import {Person, WithContext} from 'schema-dts';
import type {Person, WithContext} from 'schema-dts';

const p: WithContext<Person> = {
'@context': 'https://schema.org',
Expand Down Expand Up @@ -75,7 +75,7 @@ their parent. Other objects are defined at the top-level with an `@id`, because
multiple nodes refer to them.

```ts
import {Graph} from 'schema-dts';
import type {Graph} from 'schema-dts';

const graph: Graph = {
'@context': 'https://schema.org',
Expand Down
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
"npm": ">=7.0.0"
},
"engineStrict": true,
"peerDependencies": {
"typescript": ">=4.5.5"
},
"nyc": {
"extension": [
".ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/schema-dts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Then you can use it by importing `"schema-dts"`.
### Defining Simple Properties

```ts
import {Person} from 'schema-dts';
import type {Person} from 'schema-dts';

const inventor: Person = {
'@type': 'Person',
Expand All @@ -54,7 +54,7 @@ to describe the URIs represeting the types and properties being referenced.
schema-dts provides the `WithContext<T>` type to facilitate this.

```ts
import {Organization, Thing, WithContext} from 'schema-dts';
import type {Organization, Thing, WithContext} from 'schema-dts';

export function JsonLd<T extends Thing>(json: WithContext<T>): string {
return `<script type="application/ld+json">
Expand Down Expand Up @@ -87,7 +87,7 @@ their parent. Other objects are defined at the top-level with an `@id`, because
multiple nodes refer to them.

```ts
import {Graph} from 'schema-dts';
import type {Graph} from 'schema-dts';

const graph: Graph = {
'@context': 'https://schema.org',
Expand Down
5 changes: 1 addition & 4 deletions packages/schema-dts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "schema-dts",
"version": "1.1.2",
"version": "1.1.3",
"displayName": "schema-dts: Strongly-typed Schema.org vocabulary declarations",
"description": "A TypeScript package with latest Schema.org Schema Typings",
"author": "Eyas Sharaiha <[email protected]> (https://eyas.sh/)",
Expand All @@ -22,9 +22,6 @@
"mkdirp": "^1.0.4",
"schema-dts-gen": "*"
},
"peerDependencies": {
"typescript": ">=4.1.0"
},
"keywords": [
"typescript",
"tsd",
Expand Down

0 comments on commit dea38ff

Please sign in to comment.