Skip to content

Commit c068d68

Browse files
authored
Merge pull request #4 from typescript-package/develop
v1.1.0
2 parents 41b268e + 01afe5b commit c068d68

File tree

7 files changed

+88
-16
lines changed

7 files changed

+88
-16
lines changed

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: [angular-package] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: angularpackage # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: [
13+
'https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29',
14+
'https://donate.stripe.com/dR614hfDZcJE3wAcMM'
15+
] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,68 @@
11
<a href="https://www.typescriptlang.org/">
22
<img
3-
src="https://raw.githubusercontent.com/typescript-package/core/refs/heads/main/ts-package-barcode-logo-512.png"
4-
width="20%"
3+
src="https://avatars.githubusercontent.com/u/189666396?s=150&u=9d55b1eb4ce258974ead76bf07ccf49ef0eb0ea7&v=4"
54
title="@typescript-package/core"
65
/>
76
</a>
87

98
## typescript-package/core
109

11-
Core package.
12-
1310
<!-- npm badge -->
1411
[![npm version][typescript-package-npm-badge-svg]][typescript-package-npm-badge]
1512
[![GitHub issues][typescript-package-badge-issues]][typescript-package-issues]
1613
[![GitHub license][typescript-package-badge-license]][typescript-package-license]
1714

15+
A TypeScript library with features used across other `typescript-package` libraries.
16+
1817
<br>
1918

2019
## Table of contents
2120

22-
* [Installation](#installation)
23-
* [Api](#api)
24-
* [Git](#git)
25-
* [Commit](#commit)
26-
* [Versioning](#versioning)
27-
* [License](#license)
21+
- [Installation](#installation)
22+
- [Api](#api)
23+
- [Contributing](#contributing)
24+
- [Support](#support)
25+
- [Code of Conduct](#code-of-conduct)
26+
- [Git](#git)
27+
- [Commit](#commit)
28+
- [Versioning](#versioning)
29+
- [License](#license)
2830

2931
## Installation
3032

3133
```bash
32-
npm install @typescript-package/core
34+
npm install @typescript-package/core --save-peer
3335
```
3436

3537
## Api
3638

3739
```typescript
3840
import {
3941
resultCallback,
40-
typeOf
42+
typeOf,
43+
Value
4144
} from '@typescript-package/core';
4245
```
4346

47+
## Contributing
48+
49+
Your contributions are valued! If you'd like to contribute, please feel free to submit a pull request. Help is always appreciated.
50+
51+
## Support
52+
53+
If you find this package useful and would like to support its and general development, you can contribute through one of the following payment methods. Your support helps maintain the packages and continue adding new.
54+
55+
Support via:
56+
57+
- [Stripe](https://donate.stripe.com/dR614hfDZcJE3wAcMM)
58+
- [Revolut](https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29)
59+
60+
Thanks for your support!
61+
62+
## Code of Conduct
63+
64+
By participating in this project, you agree to follow **[Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**.
65+
4466
## GIT
4567

4668
### Commit

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@typescript-package/core",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"author": "wwwdev.io <[email protected]>",
5-
"description": "Core package.",
5+
"description": "A TypeScript library with features used across other `typescript-package` libraries.",
66
"license": "MIT",
77
"publishConfig": {
88
"access": "public",

src/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// Function.
22
export { resultCallback } from './result-callback.func';
33
export { typeOf } from './type-of.func';
4+
export { Value } from './value.class';

src/lib/value.class.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* @description
3+
* @export
4+
* @abstract
5+
* @class Value
6+
* @template Type
7+
*/
8+
export abstract class Value<Type> {
9+
/**
10+
* @description Returns the privately stored value of generic type variable `Type`.
11+
* @public
12+
* @readonly
13+
* @type {Type}
14+
*/
15+
public get value() {
16+
return this.#value;
17+
}
18+
19+
20+
/**
21+
* @description Privately stored value of generic type variable `Type`.
22+
* @type {Type}
23+
*/
24+
#value: Type;
25+
26+
/**
27+
* Creates an instance of `Value`.
28+
* @constructor
29+
* @param {Type} value
30+
*/
31+
constructor(value: Type) {
32+
this.#value = value;
33+
}
34+
}

ts-package-barcode-logo-512.png

-13.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)