ing
This commit is contained in:
parent
06967e23c9
commit
3e578d164e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
/dist-server
|
||||
/tmp
|
||||
/out-tsc
|
||||
/docs
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
|
9
.make-package.js
Normal file
9
.make-package.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
const fs = require('fs');
|
||||
const packageJson = JSON.parse(fs.readFileSync('./package.json').toString());
|
||||
|
||||
delete packageJson.devDependencies;
|
||||
delete packageJson.scripts;
|
||||
|
||||
packageJson.private = false;
|
||||
|
||||
fs.writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 2));
|
|
@ -1,3 +0,0 @@
|
|||
tsconfig.json
|
||||
tslint.json
|
||||
src
|
21
License
Normal file
21
License
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
6148
package-lock.json
generated
6148
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
"name": "@loafer/core",
|
||||
"description": "Core module of loafer",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"private": true,
|
||||
"main": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.loafle.net/loafer/typescript/core.git"
|
||||
|
@ -14,17 +16,26 @@
|
|||
"keywords": [],
|
||||
"author": "Loafle <loafer@loafle.com>",
|
||||
"scripts": {
|
||||
"compile": "npm run clean && tsc -p .",
|
||||
"watch": "tsc -w -p .",
|
||||
"clean": "rm -rf dist"
|
||||
"generate:package": "node .make-package.js",
|
||||
"generate:doc": "rimraf docs && typedoc --out docs --target es6 --theme minimal --mode file src",
|
||||
"bundle": "rimraf dist && tsc",
|
||||
"build": "npm run bundle && npm run generate:package && npm run generate:doc"
|
||||
},
|
||||
"dependencies": {
|
||||
"reflect-metadata": "^0.1.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "~8.0.0",
|
||||
"ts-node": "~4.0.1",
|
||||
"tslint": "~5.9.1",
|
||||
"typescript": "~2.5.3"
|
||||
"@types/jest": "^22.2.3",
|
||||
"@types/node": "^9.3.0",
|
||||
"jest": "^22.4.3",
|
||||
"prettier": "^1.12.1",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-jest": "^22.4.6",
|
||||
"ts-node": "^6.0.3",
|
||||
"tslint": "^5.10.0",
|
||||
"tslint-config-prettier": "^1.12.0",
|
||||
"tslint-config-standard": "^7.0.0",
|
||||
"typedoc": "^0.11.1",
|
||||
"typescript": "^2.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import {
|
||||
TypeUtil,
|
||||
} from '../util/TypeUtil';
|
||||
// import {
|
||||
// TypeUtil,
|
||||
// } from '../util/TypeUtil';
|
||||
|
||||
import { Class } from './Class';
|
||||
import { Executable } from './Executable';
|
||||
|
||||
export class Constructor extends Executable {
|
||||
private _rawConstructor: Function;
|
||||
// private _rawConstructor: Function;
|
||||
|
||||
public constructor(declaringClazz: Class, parameterTypes?: any[]) {
|
||||
super(declaringClazz, CONSTRUCTOR_NAME, parameterTypes);
|
||||
this._rawConstructor = TypeUtil.getPrototype(declaringClazz.getType())[CONSTRUCTOR_NAME];
|
||||
// this._rawConstructor = TypeUtil.getPrototype(declaringClazz.getType())[CONSTRUCTOR_NAME];
|
||||
}
|
||||
|
||||
public newInstance(...args: any[]): any {
|
||||
|
|
Loading…
Reference in New Issue
Block a user