cocoascript-types's People
cocoascript-types's Issues
所有 set 类方法丢失入参类型
not generated
- NSMakeRect
- NSColor
- NSWindowMiniaturizeButton
- NSWindowZoomButton
- NSBoxSeparator
- NSUTF8StringEncoding
- NSCachesDirectory
- NSUserDomainMask
- NSSelectorFromString
- NSHomeDirectory
- NSOKButton
wrong types
- NSButton.alloc().initWithFrame
- NSTask.alloc().init
- NSUserDefaults.alloc().initWithSuiteName(NS).objectForKey
- NSString.alloc().initWithData_encoding
- NSTemporaryDirectory
- persistentDomainForName
NSPasteboardType 类型的全局声明问题
拿这个方法测试了下 (来源):
/**
* 获取粘贴文本
**/
export const getTextFromClipboard = (): string => {
const pasteboard = NSPasteboard.generalPasteboard();
return pasteboard.stringForType(NSPasteboardTypeString).toString();
};
目前类型提示会报错。
NSPasteboard
的 stringForType
传入的是 NSPasteboardType
类型。
虽然在文档里面 NSPasteboardType
的类型是 NSString
,但是其实它是有合法值的,例如 NSPasteboardTypeURL
、NSPasteboardTypeString
、NSPasteboardTypePNG
等。而这些合法值应该都是在 Cocoa 环境中直接全局定义过了的。
因此需要在全局声明 NSPasteboardTypeString 等变量才行。
以及以此类推的话,是不是所有 Type Alias 相关的合法变量都要在全局声明一遍?
优化注释需求
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.